Bläddra i källkod

add: 医生端接口开发提交

wangzl 5 månader sedan
förälder
incheckning
a2c9b096ea
17 ändrade filer med 225 tillägg och 79 borttagningar
  1. 9 3
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/ClinicRoomController.java
  2. 2 3
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorClinicFinishDTO.java
  3. 7 6
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorClinicQuestionDTO.java
  4. 0 26
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorClinicQuestionInfoDTO.java
  5. 2 2
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorClinicRoomDTO.java
  6. 2 2
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorPatientInfoDTO.java
  7. 2 3
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorPumpInfoDTO.java
  8. 19 13
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/vo/WxDoctorClinicRoomVO.java
  9. 34 0
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/vo/WxDoctorPatientListVO.java
  10. 0 3
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/vo/WxDoctorPatientVO.java
  11. 15 0
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/mapper/BizPatientMapper.java
  12. 45 16
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/IBizClinicRoomService.java
  13. 7 0
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/IBizPatientService.java
  14. 49 0
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizClinicRoomServiceImpl.java
  15. 25 0
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizPatientServiceImpl.java
  16. 2 1
      tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizQuestionAnswerServiceImpl.java
  17. 5 1
      tr-modules/tr-module-smartFollowUp/src/main/resources/mapper/smart/BizClinicRoomMapper.xml

+ 9 - 3
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/ClinicRoomController.java

@@ -43,15 +43,16 @@ public class ClinicRoomController extends BaseController {
     @ApiOperation(value = "手术结束", notes = "权限: 无")
     @PostMapping("/finish")
     public boolean finishClinic(@RequestBody @Validated WxDoctorClinicFinishDTO finishDTO) {
-        return true;
+        return clinicRoomService.finishClinic(finishDTO);
     }
 
     @ApiOperationSupport(author = "wangzl", order = 3)
     @ApiOperation(value = "手术问卷信息", notes = "权限: 无")
     @GetMapping("/question/{clinicId}")
     public WxDoctorClinicQuestionDTO selectQuestionnaire(@PathVariable String clinicId) {
-        return null;
+        return clinicRoomService.selectQuestionnaire(clinicId);
     }
+
     @ApiOperationSupport(author = "wangzl", order = 4)
     @ApiOperation(value = "输注信息", notes = "权限: 无")
     @GetMapping("/infuse/{clinicId}")
@@ -59,5 +60,10 @@ public class ClinicRoomController extends BaseController {
         return "";
     }
 
-
+    @ApiOperationSupport(author = "wangzl", order = 5)
+    @ApiOperation(value = "术后随访", notes = "权限: 无")
+    @GetMapping("/followUp/{clinicId}")
+    public String getFollowInfo(@PathVariable String clinicId) {
+        return "";
+    }
 }

+ 2 - 3
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorClinicFinishDTO.java

@@ -3,7 +3,6 @@ package cn.tr.module.smart.app.controller.dto;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import lombok.NonNull;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
@@ -21,11 +20,11 @@ public class WxDoctorClinicFinishDTO implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    @ApiModelProperty(value = "手术ID",position = 1)
+    @ApiModelProperty(value = "手术ID", position = 1)
     @NotBlank(message = "手术ID不能为空")
     private String clinicId;
 
-    @ApiModelProperty(value = "手术结束时间",position = 2)
+    @ApiModelProperty(value = "手术结束时间", position = 2)
     @NotNull(message = "手术结束时间不能为空")
     private Date clinicEndTime;
 }

+ 7 - 6
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorClinicQuestionDTO.java

@@ -1,5 +1,6 @@
 package cn.tr.module.smart.app.controller.dto;
 
+import cn.tr.module.smart.wx.controller.vo.BizWxDeptQuestionVO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -17,19 +18,19 @@ import java.util.List;
 public class WxDoctorClinicQuestionDTO implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    @ApiModelProperty(value = "手术ID",position = 1)
+    @ApiModelProperty(value = "手术ID", position = 1)
     private String clinicId;
 
-    @ApiModelProperty(value = "患者姓名",position = 2)
+    @ApiModelProperty(value = "患者姓名", position = 2)
     private String patientName;
 
-    @ApiModelProperty(value = "患者性别",position = 3)
+    @ApiModelProperty(value = "患者性别", position = 3)
     private String patientGender;
 
-    @ApiModelProperty(value = "患者年龄",position = 4)
+    @ApiModelProperty(value = "患者年龄", position = 4)
     private Integer patientAge;
 
-    @ApiModelProperty(value = "问卷信息",position = 5)
-    private List<WxDoctorClinicQuestionInfoDTO> questionnaire;
+    @ApiModelProperty(value = "问卷信息", position = 5)
+    private List<BizWxDeptQuestionVO> questionnaire;
 
 }

+ 0 - 26
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorClinicQuestionInfoDTO.java

@@ -1,26 +0,0 @@
-package cn.tr.module.smart.app.controller.dto;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * @author wangzl
- * @description: TODO
- * @date 2025/7/14 9:06
- */
-@Data
-@ApiModel("医生端问卷信息")
-public class WxDoctorClinicQuestionInfoDTO implements Serializable {
-
-    @ApiModelProperty(value = "问卷序号",position = 1)
-    private Integer questionNum;
-
-    @ApiModelProperty(value = "问卷问题",position = 2)
-    private String question;
-
-    @ApiModelProperty(value = "问卷答案",position = 3)
-    private String answer;
-}

+ 2 - 2
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorClinicRoomDTO.java

@@ -17,11 +17,11 @@ import java.io.Serializable;
 public class WxDoctorClinicRoomDTO implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    @ApiModelProperty(value = "手术状态 术前 BEFORE 术后 AFTER ",position = 1)
+    @ApiModelProperty(value = "手术状态 术前 BEFORE 术后 AFTER ", position = 1)
     @NotBlank(message = "手术状态不能为空,术前还是术后")
     private String clinicStatus;
 
-    @ApiModelProperty(value = "检索条件",position = 2)
+    @ApiModelProperty(value = "检索条件", position = 2)
     private String queryCondition;
 
 }

+ 2 - 2
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorPatientInfoDTO.java

@@ -16,9 +16,9 @@ import java.util.List;
 @ApiModel("医生端患者信息列表查询参数")
 public class WxDoctorPatientInfoDTO {
 
-    @ApiModelProperty(value = "查询时间",position = 1)
+    @ApiModelProperty(value = "查询时间", position = 1)
     private List<Date> queryTime;
 
-    @ApiModelProperty(value = "检索条件",position = 2)
+    @ApiModelProperty(value = "检索条件", position = 2)
     private String queryCondition;
 }

+ 2 - 3
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorPumpInfoDTO.java

@@ -1,7 +1,6 @@
-package cn.tr.module.smart.app.controller.dto;
+package cn.tr.module.smart.app.controller.vo;
 
 import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -13,7 +12,7 @@ import java.io.Serializable;
  */
 @Data
 @ApiModel("医生端输注泵信息")
-public class WxDoctorPumpInfoDTO implements Serializable {
+public class WxDoctorPumpInfoVO implements Serializable {
     private static final long serialVersionUID = 1L;
 
 

+ 19 - 13
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/vo/WxDoctorClinicRoomVO.java

@@ -1,14 +1,12 @@
 package cn.tr.module.smart.app.controller.vo;
 
-import cn.tr.core.utils.AgeUtils;
-import cn.tr.module.smart.app.controller.dto.WxDoctorPumpInfoDTO;
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.Optional;
 
 /**
  * @author wangzl
@@ -20,30 +18,38 @@ import java.util.Date;
 public class WxDoctorClinicRoomVO implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    @ApiModelProperty("手术ID")
+    @ApiModelProperty(value = "手术ID", position = 1)
     private String clinicRoomId;
 
-    @ApiModelProperty("手术名称")
+    @ApiModelProperty(value = "手术名称", position = 2)
     private String clinicName;
 
-    @ApiModelProperty("手术开始时间")
+    @ApiModelProperty(value = "手术开始时间", position = 3)
     private Date clinicStartTime;
 
-    @ApiModelProperty("科室名称")
+    @ApiModelProperty(value = "科室名称", position = 4)
     private String deptName;
 
-    @ApiModelProperty("住院号")
+    @ApiModelProperty(value = "住院号", position = 5)
     private String patientCode;
 
-    @ApiModelProperty("患者姓名")
+    @ApiModelProperty(value = "患者姓名", position = 6)
     private String patientName;
 
-    @ApiModelProperty("患者年龄")
+    @ApiModelProperty(value = "患者年龄", position = 7)
     private Integer patientAge;
 
-    @ApiModelProperty("患者性别")
+    @ApiModelProperty(value = "患者性别", position = 8)
     private String patientGender;
 
-    @ApiModelProperty("泵信息")
-    private WxDoctorPumpInfoDTO pumpInfo;
+    @ApiModelProperty(value = "泵信息", position = 9)
+    private WxDoctorPumpInfoVO pumpInfo;
+
+    @ApiModelProperty(value = "术后随访次数", position = 10)
+    private Integer followUpCount = 0;
+
+    @ApiModelProperty(value = "术后镇痛评价次数", position = 11)
+    private Integer assessCount = 0;
+
+
 }

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

@@ -0,0 +1,34 @@
+package cn.tr.module.smart.app.controller.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author wangzl
+ * @description: TODO
+ * @date 2025/7/14 9:28
+ */
+@Data
+@ApiModel
+public class WxDoctorPatientListVO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "手术ID", position = 1)
+    private String clinicId;
+
+    @ApiModelProperty(value = "科室ID", position = 2)
+    private String deptId;
+
+    @ApiModelProperty(value = "科室名称", position = 3)
+    private String deptName;
+
+    @ApiModelProperty(value = "手术名称", position = 4)
+    private String clinicName;
+
+    @ApiModelProperty(value = "手术开始时间", position = 5)
+    private Date clinicStartTime;
+}

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

@@ -1,13 +1,10 @@
 package cn.tr.module.smart.app.controller.vo;
 
-import cn.tr.core.utils.AgeUtils;
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
 
 /**
  * @author wangzl

+ 15 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/mapper/BizPatientMapper.java

@@ -1,13 +1,20 @@
 package cn.tr.module.smart.common.mapper;
 
+import cn.tr.module.smart.app.controller.vo.WxDoctorPatientListVO;
+import cn.tr.module.smart.common.po.BizClinicRoomPO;
 import cn.tr.module.smart.common.po.BizPatientPO;
 import cn.tr.module.smart.common.dto.BizPatientDTO;
 import cn.tr.module.smart.wx.dto.BizClinicAddOrEditDTO;
+
 import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.Mappings;
 import org.mapstruct.factory.Mappers;
 
 import java.util.List;
 
+import static java.util.stream.Collectors.mapping;
+
 /**
 * 患者信息映射工具
 *
@@ -27,5 +34,13 @@ public interface BizPatientMapper {
     List<BizPatientDTO> convertDtoList(List<BizPatientPO> source);
 
     List<BizPatientPO> convertPOList(List<BizPatientDTO> source);
+    @Mappings({
+            @Mapping(source = "id", target = "clinicId")
+    })
+    List<WxDoctorPatientListVO> convertPatientListVO(List<BizClinicRoomPO> source);
+    @Mappings({
+            @Mapping(source = "id", target = "clinicId")
+    })
+    WxDoctorPatientListVO convertPatientVO(BizClinicRoomPO source);
 
 }

+ 45 - 16
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/IBizClinicRoomService.java

@@ -1,5 +1,7 @@
 package cn.tr.module.smart.common.service;
 
+import cn.tr.module.smart.app.controller.dto.WxDoctorClinicFinishDTO;
+import cn.tr.module.smart.app.controller.dto.WxDoctorClinicQuestionDTO;
 import cn.tr.module.smart.app.controller.dto.WxDoctorClinicRoomDTO;
 import cn.tr.module.smart.app.controller.vo.WxDoctorClinicRoomVO;
 import cn.tr.module.smart.common.dto.BizClinicRoomDTO;
@@ -11,18 +13,20 @@ import cn.tr.module.smart.wx.dto.BizClinicAddOrEditDTO;
 import cn.tr.module.smart.wx.dto.BizWxAppletClinicQueryDTO;
 import cn.tr.module.smart.wx.dto.BizWxAppletFinishClinicDTO;
 
-import java.util.*;
+import java.util.Collection;
+import java.util.List;
 
 /**
  * 诊疗室Service接口
  *
  * @author lf
- * @date  2025/06/09 10:59
+ * @date 2025/06/09 10:59
  **/
-public interface IBizClinicRoomService{
+public interface IBizClinicRoomService {
 
     /**
      * 微信小程序查询所有的患者信息
+     *
      * @param query
      * @return
      */
@@ -31,6 +35,7 @@ public interface IBizClinicRoomService{
 
     /**
      * 获取用户当前关注的手术信息
+     *
      * @param currentUserId
      * @return
      */
@@ -38,6 +43,7 @@ public interface IBizClinicRoomService{
 
     /**
      * 微信小程序新增患者手术信息
+     *
      * @param source
      * @return
      */
@@ -45,6 +51,7 @@ public interface IBizClinicRoomService{
 
     /**
      * 微信小程序编辑患者手术信息
+     *
      * @param source
      * @return
      */
@@ -52,6 +59,7 @@ public interface IBizClinicRoomService{
 
     /**
      * 微信小程序查询患者详情
+     *
      * @param id
      * @return
      */
@@ -59,6 +67,7 @@ public interface IBizClinicRoomService{
 
     /**
      * 添加手术结束时间
+     *
      * @param source
      * @return
      */
@@ -66,6 +75,7 @@ public interface IBizClinicRoomService{
 
     /**
      * 微信端删除患者信息
+     *
      * @param ids
      * @return
      */
@@ -75,41 +85,46 @@ public interface IBizClinicRoomService{
 
     /**
      * 根据条件查询诊疗室
-     * @param    query 查询参数
-     * @author   lf
-     * @date      2025/06/09 10:59
+     *
+     * @param query 查询参数
+     * @author lf
+     * @date 2025/06/09 10:59
      */
     List<BizClinicRoomDTO> selectBizClinicRoomList(BizClinicRoomQueryDTO query);
 
     /**
      * 根据id查询诊疗室
-     * @param    id 主键id
-     * @author   lf
-     * @date      2025/06/09 10:59
+     *
+     * @param id 主键id
+     * @author lf
+     * @date 2025/06/09 10:59
      */
     BizClinicRoomDTO selectBizClinicRoomById(String id);
 
     /**
      * 编辑诊疗室
-     * @param   source 编辑实体类
-     * @author  lf
-     * @date     2025/06/09 10:59
+     *
+     * @param source 编辑实体类
+     * @author lf
+     * @date 2025/06/09 10:59
      */
     boolean updateBizClinicRoomById(BizClinicRoomDTO source);
 
     /**
      * 新增诊疗室
-     * @param   source 新增实体类
+     *
+     * @param source 新增实体类
      * @author lf
-     * @date  2025/06/09 10:59
+     * @date 2025/06/09 10:59
      */
     boolean insertBizClinicRoom(BizClinicRoomDTO source);
 
     /**
      * 删除诊疗室详情
-     * @param  ids 删除主键集合
+     *
+     * @param ids 删除主键集合
      * @author lf
-     * @date    2025/06/09 10:59
+     * @date 2025/06/09 10:59
      */
     int removeBizClinicRoomByIds(Collection<String> ids);
 
@@ -119,4 +134,18 @@ public interface IBizClinicRoomService{
      * @date 2025/6/10
      */
     List<WxDoctorClinicRoomVO> selectByClinicRoomAndPatientList(WxDoctorClinicRoomDTO source);
+
+    /**
+     * @description: 手术结束
+     * @author wangzl
+     * @date 2025/7/14
+     */
+    boolean finishClinic(WxDoctorClinicFinishDTO finishDTO);
+
+    /**
+     * @description: 术前问卷信息
+     * @author wangzl
+     * @date 2025/7/14
+     */
+    WxDoctorClinicQuestionDTO selectQuestionnaire(String clinicId);
 }

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

@@ -1,6 +1,7 @@
 package cn.tr.module.smart.common.service;
 
 import cn.tr.module.smart.app.controller.dto.WxDoctorPatientInfoDTO;
+import cn.tr.module.smart.app.controller.vo.WxDoctorPatientListVO;
 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;
@@ -65,4 +66,10 @@ public interface IBizPatientService{
     List<WxDoctorPatientVO>  selectPatientList(WxDoctorPatientInfoDTO source);
 
     BizPatientPO insertBizPatientAndReturnObj(BizClinicAddOrEditDTO source);
+    /**
+     * @description: 术前问卷列表
+     * @author wangzl
+     * @date 2025/7/14
+     */
+    List<WxDoctorPatientListVO> selectQuestionList(String patientId);
 }

+ 49 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizClinicRoomServiceImpl.java

@@ -6,6 +6,8 @@ import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.tr.core.exception.TRExcCode;
 import cn.tr.core.strategy.LoginUserStrategy;
+import cn.tr.module.smart.app.controller.dto.WxDoctorClinicFinishDTO;
+import cn.tr.module.smart.app.controller.dto.WxDoctorClinicQuestionDTO;
 import cn.tr.module.smart.app.controller.dto.WxDoctorClinicRoomDTO;
 import cn.tr.module.smart.app.controller.vo.WxDoctorClinicRoomVO;
 import cn.tr.module.smart.common.dto.BizDeptDTO;
@@ -22,6 +24,7 @@ import cn.tr.module.smart.wx.controller.vo.BizWxDeptQuestionVO;
 import cn.tr.module.smart.wx.dto.BizClinicAddOrEditDTO;
 import cn.tr.module.smart.wx.dto.BizWxAppletClinicQueryDTO;
 import cn.tr.module.smart.wx.dto.BizWxAppletFinishClinicDTO;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
@@ -66,6 +69,9 @@ public class BizClinicRoomServiceImpl implements IBizClinicRoomService {
     @Autowired
     private IBizQuestionService bizQuestionService;
 
+    @Autowired
+    private IBizQuestionAnswerService bizQuestionAnswerService;
+
     @Autowired
     private IBizDeptService bizDeptService;
 
@@ -333,6 +339,49 @@ public class BizClinicRoomServiceImpl implements IBizClinicRoomService {
         return baseRepository.selectByClinicRoomAndPatientList(source);
     }
 
+    /**
+     * @param finishDTO
+     * @description: 手术结束
+     * @author wangzl
+     * @date 2025/7/14
+     */
+    @Override
+    public boolean finishClinic(WxDoctorClinicFinishDTO finishDTO) {
+        BizClinicRoomPO clinicRoom = baseRepository.selectById(finishDTO.getClinicId());
+        if (ObjectUtil.isNull(clinicRoom)) {
+            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "手术信息不存在");
+        }
+        if (ClinicPhaseEnums.AFTER.equals(clinicRoom.getClinicStatus())) {
+            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "手术已结束,无法结束手术");
+        }
+        int update = baseRepository.update(null, new LambdaUpdateWrapper<BizClinicRoomPO>()
+                .set(BizClinicRoomPO::getClinicStatus, ClinicPhaseEnums.AFTER)
+                .set(BizClinicRoomPO::getClinicEndTime, finishDTO.getClinicEndTime())
+                .eq(BizClinicRoomPO::getId, finishDTO.getClinicId()));
+        return update != 0;
+    }
+
+    /**
+     * @param clinicId
+     * @description: 术前问卷信息
+     * @author wangzl
+     * @date 2025/7/14
+     */
+    @Override
+    public WxDoctorClinicQuestionDTO selectQuestionnaire(String clinicId) {
+        BizClinicRoomPO bizClinicRoomPO = baseRepository.selectById(clinicId);
+        if (ObjectUtil.isNull(bizClinicRoomPO)) {
+            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "手术信息不存在");
+        }
+        WxDoctorClinicQuestionDTO questionDTO = new WxDoctorClinicQuestionDTO();
+        questionDTO.setClinicId(clinicId);
+        questionDTO.setPatientName(bizClinicRoomPO.getPatientName());
+        questionDTO.setPatientGender(bizClinicRoomPO.getPatientGender());
+        questionDTO.setPatientAge(bizClinicRoomPO.getPatientAge());
+        questionDTO.setQuestionnaire(bizQuestionAnswerService.stdSelectWxAppletPreSurgeryQuestionnaire(clinicId));
+        return null;
+    }
+
     /**
      * 微信小程序基于医生已填写的信息更新数据
      */

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

@@ -2,7 +2,10 @@ package cn.tr.module.smart.common.service.impl;
 
 import cn.tr.core.exception.TRExcCode;
 import cn.tr.module.smart.app.controller.dto.WxDoctorPatientInfoDTO;
+import cn.tr.module.smart.app.controller.vo.WxDoctorPatientListVO;
 import cn.tr.module.smart.app.controller.vo.WxDoctorPatientVO;
+import cn.tr.module.smart.common.po.BizClinicRoomPO;
+import cn.tr.module.smart.common.repository.BizClinicRoomRepository;
 import cn.tr.module.smart.wx.dto.BizClinicAddOrEditDTO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -28,6 +31,10 @@ public class BizPatientServiceImpl implements IBizPatientService {
     @Autowired
     private BizPatientRepository baseRepository;
 
+    @Autowired
+    private BizClinicRoomRepository clinicRoomRepository;
+
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public BizPatientPO insertBizPatientAndReturnObj(BizClinicAddOrEditDTO source) {
@@ -36,6 +43,24 @@ public class BizPatientServiceImpl implements IBizPatientService {
         baseRepository.insert(insertSource);
         return insertSource;
     }
+
+    /**
+     * @param patientId 患者ID
+     * @description: 术前问卷列表
+     * @author wangzl
+     * @date 2025/7/14
+     */
+    @Override
+    public List<WxDoctorPatientListVO> selectQuestionList(String patientId) {
+        List<BizClinicRoomPO> bizClinicRoomPOS = clinicRoomRepository.selectList(new LambdaQueryWrapper<BizClinicRoomPO>()
+                .eq(BizClinicRoomPO::getPatientId, patientId)
+                .orderByDesc(BizClinicRoomPO::getClinicStartTime));
+        if (CollectionUtil.isEmpty(bizClinicRoomPOS)) {
+            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"该患者手术信息未找到");
+        }
+        return BizPatientMapper.INSTANCE.convertPatientListVO(bizClinicRoomPOS);
+    }
+
     /**
      * 根据条件查询患者信息
      * @param    query 查询参数

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

@@ -89,7 +89,8 @@ public class BizQuestionAnswerServiceImpl implements IBizQuestionAnswerService {
         //填充回答
         List<BizWxAppletQuestionAnswerEntity> answerContent = questionAnswer.getContent();
         if(CollectionUtil.isNotEmpty(answerContent)&&CollectionUtil.isNotEmpty(questionAnswerList)){
-            Map<String, BizWxDeptQuestionVO> questionMap = questionAnswerList.stream().collect(Collectors.groupingBy(BizWxDeptQuestionVO::getFieldName, Collectors.collectingAndThen(Collectors.toList(), CollectionUtil::getFirst)));
+            Map<String, BizWxDeptQuestionVO> questionMap = questionAnswerList.stream().collect(Collectors.groupingBy(BizWxDeptQuestionVO::getFieldName,
+                    Collectors.collectingAndThen(Collectors.toList(), CollectionUtil::getFirst)));
             for (BizWxAppletQuestionAnswerEntity answer : answerContent) {
                 if(StrUtil.isEmpty(answer.getFiledName())){
                     continue;

+ 5 - 1
tr-modules/tr-module-smartFollowUp/src/main/resources/mapper/smart/BizClinicRoomMapper.xml

@@ -51,6 +51,8 @@
         <result property="patientName" column="patient_name"/>
         <result property="patientAge" column="patient_age"/>
         <result property="patientGender" column="patient_gender"/>
+        <result property="followUpCount" column="follow_up_count"/>
+        <result property="assessCount" column="assess_count"/>
     </resultMap>
 
     <select id="stdSelectWxAppletClinicList" resultMap="stdWxAppletResult">
@@ -91,7 +93,9 @@
         bcr.patient_name,
         bcr.patient_age,
         bcr.patient_gender,
-        bp.patient_code
+        bp.patient_code,
+        bcr.follow_up_count,
+        bcr.assess_count
         FROM biz_clinic_room bcr
         join biz_patient bp
         on bcr.patient_id = bp.id