Ver código fonte

add
IM表结构

lifang 4 meses atrás
pai
commit
2203231b90

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

@@ -52,4 +52,7 @@ public class WxDoctorClinicRoomThumbnailVO implements Serializable {
 
     @ApiModelProperty(value = "患者ID", position = 11)
     private String patientId;
+
+    @ApiModelProperty("看护患者的微信用户id")
+    private String wxUserId;
 }

+ 10 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/web/controller/BizDeviceController.java

@@ -8,6 +8,7 @@ import cn.tr.module.smart.common.dto.BizDeviceDTO;
 import cn.tr.module.smart.common.dto.BizDeviceQueryDTO;
 import cn.tr.module.smart.common.service.IBizDeviceService;
 import cn.tr.module.smart.web.dto.BizDeviceAlarmInfoDTO;
+import cn.tr.module.smart.web.dto.BizDeviceBindClinicDTO;
 import cn.tr.module.smart.web.vo.BizDeviceAndClinicDetailVO;
 import cn.tr.module.smart.web.vo.BizDeviceDetailVO;
 import cn.tr.module.sys.oauth2.LoginTypeConstant;
@@ -18,6 +19,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
@@ -64,6 +66,7 @@ public class BizDeviceController extends BaseController {
     public CommonResult<List<BizDeviceAlarmInfoDTO>> queryAlarmInfo(@PathVariable String infusionId) {
         return CommonResult.success(bizDeviceService.queryAlarmInfo(infusionId));
     }
+
     @ApiOperationSupport(author = "wangzl", order = 5)
     @ApiOperation(value = "查询输注折线图", notes = "权限: 无")
     @GetMapping("/infusion/graph/{infusionId}")
@@ -72,4 +75,11 @@ public class BizDeviceController extends BaseController {
     }
 
 
+    @ApiOperationSupport(author = "lf", order = 5)
+    @ApiOperation(value = "绑定手术信息", notes = "权限: 无")
+    @GetMapping("/bindClinic}")
+    public CommonResult<String> bindClinic(@RequestBody@Validated BizDeviceBindClinicDTO source) {
+        return CommonResult.success(null);
+    }
+
 }

+ 1 - 1
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/web/controller/BizQuestionGroupController.java

@@ -116,4 +116,4 @@ public class BizQuestionGroupController extends BaseController{
     public CommonResult<List<BizQuestionDTO>> generateAi(@RequestBody@Validated BizQuestionGroupAiDTO source) throws NoApiKeyException, InputRequiredException {
         return CommonResult.success(bizQuestionGroupService.generateAi(source));
     }
-}
+}

+ 17 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/web/dto/BizDeviceBindClinicDTO.java

@@ -0,0 +1,17 @@
+package cn.tr.module.smart.web.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+@Data
+public class BizDeviceBindClinicDTO {
+    @ApiModelProperty(value = "手术ID")
+    @NotBlank(message = "手术ID不能为空")
+    private String clinicId;
+
+    @ApiModelProperty(value = "设备ID")
+    @NotBlank(message = "设备ID不能为空")
+    private String deviceId;
+}

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

@@ -67,6 +67,7 @@
         <result property="patientAvatar" column="patient_avatar"/>
         <result property="patientId" column="patient_id"/>
         <result property="doctorId" column="doctor_id"/>
+        <result property="wxUserId" column="wx_user_id"/>
     </resultMap>
 
     <select id="stdSelectWxAppletClinicList" resultMap="stdWxAppletDetailResult">
@@ -271,6 +272,7 @@
         bcr.clinic_name as clinic_name,
         bcr.clinic_start_time as clinic_start_time,
         bcr.dept_id as dept_id,
+        bp.id as patient_id,
         bcr.dept_name as dept_name,
         bcr.patient_code as patient_code,
         bcr.patient_name as patient_name,
@@ -278,7 +280,7 @@
         bcr.patient_age as patient_age,
         bcr.image_url as patient_avatar,
         bcrdu.user_id as doctor_id,
-        bcrwu.wx_user_id as patient_id
+        bcrwu.wx_user_id as wx_user_id
         from
         biz_patient as bp
         join biz_clinic_room as bcr on bp.current_clinic_id  = bcr.id

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

@@ -109,7 +109,7 @@
         bcr.id as clinic_id
         FROM
         biz_device bd
-        left JOIN biz_infusion_history bih ON bd.infusion_id = bih.ID
+        left JOIN biz_infusion_history bih ON bd.infusion_id = bih.id
         left JOIN biz_infusion_clinic bic ON bih.ID = bic.infusion_id
         left JOIN biz_clinic_room bcr ON bic.clinic_id = bcr.ID
         <where>