提交 d62aac32 authored 作者: zhu's avatar zhu

1.develop

2.fix bug
上级 9314f5f1
......@@ -73,6 +73,8 @@ dependencies {
implementation 'com.github.tencentyun:tls-sig-api-v2:2.0'
implementation 'org.apache.poi:poi-ooxml:5.2.3'
implementation 'cn.hutool:hutool-all:5.8.16'
implementation 'org.springframework.boot:spring-boot-starter-aop:3.1.0'
implementation 'com.alibaba:fastjson:2.0.42'
......
......@@ -21,7 +21,9 @@ import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.xwd.hospital.server.base.BaseDomain;
import com.xwd.hospital.server.enums.AuditStateEnum;
import com.xwd.hospital.server.domain.DoctorInfo;
import com.xwd.hospital.server.domain.User;
@Data
@Builder(builderMethodName = "newBuilder")
......@@ -85,6 +87,30 @@ public class DoctorFamilyAddressInfo extends BaseDomain {
@TableField(value = "detail_address")
@Schema(description = "详细地址", nullable = false)
private String detailAddress;
/**
* 审核状态
*/
@TableField(value = "audit_state")
@Schema(description = "审核状态", nullable = false)
private AuditStateEnum auditState;
/**
* 审核人Id
*/
@TableField(value = "audit_id")
@Schema(description = "审核人Id")
private Long auditId;
/**
* 审核人Id
*/
@Schema(description = "审核人Id")
@TableField(exist = false)
private User audit;
/**
* 失败原因
*/
@TableField(value = "reject_reason")
@Schema(description = "失败原因")
private String rejectReason;
/**
* 操作人Id
*/
......@@ -117,6 +143,9 @@ public class DoctorFamilyAddressInfo extends BaseDomain {
*/
@Override
public DoctorFamilyAddressInfo setDefault() {
if (this.getAuditState() == null) {
this.setAuditState(AuditStateEnum.TO_AUDIT);
}
if (this.getEditorId() == null) {
this.setEditorId(1L);
}
......@@ -179,6 +208,12 @@ public class DoctorFamilyAddressInfo extends BaseDomain {
}
return false;
}
if (this.getAuditState() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "审核状态不能为空!");
}
return false;
}
if (this.getEditorId() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "操作人Id不能为空!");
......
......@@ -22,8 +22,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.xwd.hospital.server.base.BaseDomain;
import com.xwd.hospital.server.enums.SexTypeEnum;
import com.xwd.hospital.server.enums.AuditStateEnum;
import com.xwd.hospital.server.enums.FamilyDoctorStateEnum;
import com.xwd.hospital.server.domain.UserInfo;
import com.xwd.hospital.server.domain.User;
import com.xwd.hospital.server.domain.DoctorInfo;
@Data
......@@ -89,11 +90,29 @@ public class FamilyDoctor extends BaseDomain {
@Schema(description = "家庭地址", nullable = false)
private String familyAddress;
/**
* 审核状态
* 家庭医生状态
*/
@TableField(value = "audit_state")
@Schema(description = "审核状态", nullable = false)
private AuditStateEnum auditState;
@Schema(description = "家庭医生状态", nullable = false)
private FamilyDoctorStateEnum auditState;
/**
* 审核人Id
*/
@TableField(value = "audit_id")
@Schema(description = "审核人Id")
private Long auditId;
/**
* 审核人Id
*/
@Schema(description = "审核人Id")
@TableField(exist = false)
private User audit;
/**
* 失败原因
*/
@TableField(value = "reject_reason")
@Schema(description = "失败原因")
private String rejectReason;
/**
* 相关联的家庭医生Id
*/
......@@ -142,7 +161,7 @@ public class FamilyDoctor extends BaseDomain {
this.setSex(SexTypeEnum.MALE);
}
if (this.getAuditState() == null) {
this.setAuditState(AuditStateEnum.TO_AUDIT);
this.setAuditState(FamilyDoctorStateEnum.TO_CONFIRM);
}
if (this.getEditorId() == null) {
this.setEditorId(1L);
......@@ -208,7 +227,7 @@ public class FamilyDoctor extends BaseDomain {
}
if (this.getAuditState() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "审核状态不能为空!");
throw new ApiCode.ApiException(-1, "家庭医生状态不能为空!");
}
return false;
}
......
......@@ -22,10 +22,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.xwd.hospital.server.base.BaseDomain;
import com.xwd.hospital.server.enums.AuditStateEnum;
import com.xwd.hospital.server.domain.UserInfo;
import com.xwd.hospital.server.domain.PatientInfo;
import com.xwd.hospital.server.domain.HospitalInfo;
import com.xwd.hospital.server.domain.HospitalInfo;
import com.xwd.hospital.server.domain.DoctorInfo;
import com.xwd.hospital.server.domain.DoctorInfo;
import com.xwd.hospital.server.domain.DoctorInfo;
import com.xwd.hospital.server.domain.User;
@Data
......@@ -42,18 +44,6 @@ public class ReferralRecord extends BaseDomain {
@TableId(value = "id", type = IdType.AUTO)
@Schema(description = "Id", nullable = false)
private Long id;
/**
* 用户Id
*/
@TableField(value = "user_info_id")
@Schema(description = "用户Id", nullable = false)
private Long userInfoId;
/**
* 用户Id
*/
@Schema(description = "用户Id")
@TableField(exist = false)
private UserInfo userInfo;
/**
* 患者Id
*/
......@@ -90,6 +80,42 @@ public class ReferralRecord extends BaseDomain {
@Schema(description = "转入医院Id")
@TableField(exist = false)
private HospitalInfo inHospital;
/**
* 转出医生Id
*/
@TableField(value = "out_doctor_id")
@Schema(description = "转出医生Id", nullable = false)
private Long outDoctorId;
/**
* 转出医生Id
*/
@Schema(description = "转出医生Id")
@TableField(exist = false)
private DoctorInfo outDoctor;
/**
* 转入医生Id
*/
@TableField(value = "in_doctor_id")
@Schema(description = "转入医生Id", nullable = false)
private Long inDoctorId;
/**
* 转入医生Id
*/
@Schema(description = "转入医生Id")
@TableField(exist = false)
private DoctorInfo inDoctor;
/**
* 转诊医生Id
*/
@TableField(value = "doctor_id")
@Schema(description = "转诊医生Id", nullable = false)
private Long doctorId;
/**
* 转诊医生Id
*/
@Schema(description = "转诊医生Id")
@TableField(exist = false)
private DoctorInfo doctor;
/**
* 审核状态
*/
......@@ -163,12 +189,6 @@ public class ReferralRecord extends BaseDomain {
*/
@Override
public boolean validate(boolean throwException) {
if (this.getUserInfoId() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "用户Id不能为空!");
}
return false;
}
if (this.getPatientId() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "患者Id不能为空!");
......@@ -187,6 +207,24 @@ public class ReferralRecord extends BaseDomain {
}
return false;
}
if (this.getOutDoctorId() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "转出医生Id不能为空!");
}
return false;
}
if (this.getInDoctorId() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "转入医生Id不能为空!");
}
return false;
}
if (this.getDoctorId() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "转诊医生Id不能为空!");
}
return false;
}
if (this.getAuditState() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "审核状态不能为空!");
......
package com.xwd.hospital.server.dto;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class ReferralDoctorDto {
private Long doctorId;
private String doctorName;
private String hospitalName;
private String departmentName;
private String title;
private String avatar;
}
/**
* 项目:互联网医疗
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package com.xwd.hospital.server.enums;
/**
* 家庭医生状态
*/
public enum FamilyDoctorStateEnum {
TO_CONFIRM("待确认"),
REJECT("医生拒绝"),
TO_AUDIT("待审核"),
AUDIT_SUCCESS("审核通过"),
AUDIT_FAIL("审核失败");
FamilyDoctorStateEnum(String name) {
this.name = name;
}
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
......@@ -31,10 +31,19 @@ public interface DoctorInfoMapper extends DoctorInfoBaseMapper {
@Param("departmentName")String departmentName,
@Param("departmentIdList") List<Long> departmentIdList);
IPage<DoctorDto> queryDoctorListLikely(@Param("page") Page<DoctorDto> page,@Param("keyword")String keyword,
@Param("departmentIdList") List<Long> departmentIdList);
DoctorInfoDto queryDoctorDetail(@Param("doctorId")Long doctorId);
String selectNameById(Long doctorId);
List<DiseaseDto> queryDiseaseList(@Param("doctorId")Long doctorId);
IPage<PatientInfoDto> queryMyPatient(@Param("page") Page<PatientInfoDto> page, @Param("doctorId")Long doctorId);
IPage<PatientInfoDto> queryMyPatient(@Param("page") Page<PatientInfoDto> page,
@Param("doctorId")Long doctorId,
@Param("patientName") String patientName);
IPage<ReferralDoctorDto> queryDoctorByHospitalId(@Param("page") Page<ReferralDoctorDto> page,
@Param("hospitalId")Long hospitalId,
@Param("doctorName")String doctorName);
}
......@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xwd.hospital.server.annotation.ApiCommon;
import com.xwd.hospital.server.annotation.AuthUser;
import com.xwd.hospital.server.base.BaseController;
import com.xwd.hospital.server.domain.ReferralRecord;
import com.xwd.hospital.server.domain.User;
import com.xwd.hospital.server.rest.res.ApiCode;
import com.xwd.hospital.server.domain.DoctorFamilyAddressInfo;
......@@ -87,5 +88,23 @@ public class DoctorFamilyAddressInfoController extends BaseController<DoctorFami
return ApiResponse.ok(this.service.saveBatch(entityList));
}
/**
* 审核通过
*/
@PostMapping("/auditPass/{id}")
@Operation(summary = "审核通过")
public ApiResponse auditPass(@PathVariable("id") Long id, @AuthUser User user) {
return ApiResponse.ok(this.service.auditPass(id,user));
}
/**
* 审核失败
*/
@PostMapping("/auditFail/{id}")
@Operation(summary = "审核失败")
public ApiResponse auditFail(@PathVariable("id") Long id,@RequestBody String rejectReason, @AuthUser User user) {
return ApiResponse.ok(this.service.auditFail(id, rejectReason,user));
}
}
......@@ -25,6 +25,7 @@ import com.xwd.hospital.server.domain.User;
import com.xwd.hospital.server.dto.DoctorDto;
import com.xwd.hospital.server.dto.OrderDto;
import com.xwd.hospital.server.dto.PatientInfoDto;
import com.xwd.hospital.server.dto.ReferralDoctorDto;
import com.xwd.hospital.server.rest.req.DoctorSearchParam;
import com.xwd.hospital.server.rest.res.ApiCode;
import com.xwd.hospital.server.domain.DoctorInfo;
......@@ -101,10 +102,7 @@ public class DoctorInfoController extends BaseController<DoctorInfoService, Doct
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
Page<DoctorDto> page = new Page<>(pageNum, pageSize);
List<DoctorDto> list = this.service.queryDoctorList(param);
page.setRecords(list);
return ApiResponse.ok(page);
return ApiResponse.ok(this.service.queryDoctorList(page,param));
}
/**
......@@ -113,9 +111,9 @@ public class DoctorInfoController extends BaseController<DoctorInfoService, Doct
*/
@PostMapping("/queryDoctorDetail")
@Operation(summary = "小程序医生详情")
public ApiResponse queryDoctorDetail(Long doctorId){
public ApiResponse queryDoctorDetail(@RequestParam(value = "doctorId")Long doctorId,@AuthUser User user){
return ApiResponse.ok(this.service.queryDoctorDetail(doctorId));
return ApiResponse.ok(this.service.queryDoctorDetail(doctorId,user.getId()));
}
/**
......@@ -124,11 +122,26 @@ public class DoctorInfoController extends BaseController<DoctorInfoService, Doct
*/
@GetMapping("/queryMyPatient")
@Operation(summary = "我的患者")
public ApiResponse queryMyPatient(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
public ApiResponse queryMyPatient(@RequestParam(value = "patientName",required = false) String patientName,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,@AuthUser User user){
Page<PatientInfoDto> page = new Page<>(pageNum, pageSize);
return ApiResponse.ok(this.service.queryMyPatient(page));
return ApiResponse.ok(this.service.queryMyPatient(page,patientName));
}
/**
* 根据医院id查询医生列表
*
*/
@PostMapping("/queryDoctorByHospitalId")
@Operation(summary = "根据医院id查询医生列表")
public ApiResponse queryDoctorList(@RequestParam(value = "hospitalId") Long hospitalId,
@RequestParam(value = "doctorName",required = false) String doctorName,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
Page<ReferralDoctorDto> page = new Page<>(pageNum, pageSize);
return ApiResponse.ok(this.service.queryDoctorByHospitalId(page,hospitalId,doctorName));
}
}
......@@ -96,5 +96,41 @@ public class FamilyDoctorController extends BaseController<FamilyDoctorService,
return ApiResponse.ok(this.service.saveBatch(entityList));
}
/**
* 医生确认
*/
@PostMapping("/confirm/{id}")
@Operation(summary = "医生确认")
public ApiResponse confirm(@PathVariable("id") Long id, @AuthUser User user) {
return ApiResponse.ok(this.service.confirm(id,user));
}
/**
* 医生拒绝
*/
@PostMapping("/reject/{id}")
@Operation(summary = "医生拒绝")
public ApiResponse reject(@PathVariable("id") Long id,@RequestBody String rejectReason, @AuthUser User user) {
return ApiResponse.ok(this.service.reject(id, rejectReason,user));
}
/**
* 审核通过
*/
@PostMapping("/auditPass/{id}")
@Operation(summary = "审核通过")
public ApiResponse auditPass(@PathVariable("id") Long id, @AuthUser User user) {
return ApiResponse.ok(this.service.auditPass(id,user));
}
/**
* 审核失败
*/
@PostMapping("/auditFail/{id}")
@Operation(summary = "审核失败")
public ApiResponse auditFail(@PathVariable("id") Long id,@RequestBody String rejectReason, @AuthUser User user) {
return ApiResponse.ok(this.service.auditFail(id, rejectReason,user));
}
}
......@@ -99,6 +99,17 @@ public class MedicalQualificationsController extends BaseController<MedicalQuali
return ApiResponse.ok(this.service.uploadQualification(dto));
}
/**
* 删除医生资质
*
*/
@PostMapping("/deleteQualification/{id}")
@Operation(summary = "删除医生资质")
public ApiResponse deleteQualification(@PathVariable("id")Long id, @AuthUser User user) {
return ApiResponse.ok(this.service.deleteQualification(id));
}
}
......@@ -23,6 +23,7 @@ import com.xwd.hospital.server.annotation.ApiCommon;
import com.xwd.hospital.server.annotation.AuthUser;
import com.xwd.hospital.server.base.BaseController;
import com.xwd.hospital.server.domain.User;
import com.xwd.hospital.server.enums.YesNoEnum;
import com.xwd.hospital.server.rest.res.ApiCode;
import com.xwd.hospital.server.domain.PatientInfo;
import com.xwd.hospital.server.rest.req.PatientInfoParam;
......@@ -75,7 +76,7 @@ public class PatientInfoController extends BaseController<PatientInfoService, Pa
}
}
PatientInfo one = this.service.getOne(Wrappers.<PatientInfo>lambdaQuery().eq(PatientInfo::getIdNo, entity.getIdNo())
.eq(PatientInfo::getUserInfoId, entity.getUserInfoId()));
.eq(PatientInfo::getUserInfoId, entity.getUserInfoId()).eq(PatientInfo::getDeleteStatus, YesNoEnum.NO));
if(null != one){
return ApiResponse.fail(ApiCode.FAILED.getCode(),"此就诊人身份证号已添加");
}
......
......@@ -8,8 +8,7 @@
package com.xwd.hospital.server.rest;
import java.util.List;
import java.util.Arrays;
import java.util.*;
import cn.dev33.satoken.stp.SaLoginModel;
import cn.dev33.satoken.stp.StpUtil;
......@@ -20,12 +19,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xwd.hospital.server.annotation.ApiCommon;
import com.xwd.hospital.server.annotation.AuthUser;
import com.xwd.hospital.server.annotation.ControllerWebLog;
import com.xwd.hospital.server.base.BaseController;
import com.xwd.hospital.server.domain.DoctorInfo;
import com.xwd.hospital.server.domain.User;
import com.xwd.hospital.server.dto.ReferralDoctorDto;
import com.xwd.hospital.server.enums.AuditStateEnum;
import com.xwd.hospital.server.rest.res.ApiCode;
import com.xwd.hospital.server.domain.ReferralRecord;
import com.xwd.hospital.server.rest.req.ReferralRecordParam;
import com.xwd.hospital.server.rest.res.ApiResponse;
import com.xwd.hospital.server.service.DoctorInfoService;
import com.xwd.hospital.server.service.ReferralRecordService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -37,9 +41,7 @@ import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
......@@ -47,6 +49,9 @@ import java.util.Map;
@RequestMapping("/v1/pms/referral-record")
public class ReferralRecordController extends BaseController<ReferralRecordService, ReferralRecord, ReferralRecordParam> {
@Resource
private DoctorInfoService doctorInfoService;
@Resource
public void setService(ReferralRecordService service) {
this.service = service;
......@@ -64,6 +69,16 @@ public class ReferralRecordController extends BaseController<ReferralRecordServi
public ApiResponse<ReferralRecord> add(@RequestBody ReferralRecord entity, @AuthUser User user) {
entity.setEditorId(user.getId());
entity.setEditorName(user.getUsername());
DoctorInfo doctorInfo = doctorInfoService.lambdaQuery().eq(DoctorInfo::getUserId, user.getId()).one();
if(Objects.isNull(doctorInfo)){
throw new ApiCode.ApiException(-1,"信息错误");
}
if(entity.getOutDoctorId() == entity.getInDoctorId()){
throw new ApiCode.ApiException(-1,"信息错误");
}
entity.setDoctorId(doctorInfo.getId());
entity.setDefault().validate(true);
this.service.save(entity);
return ApiResponse.ok(this.service.getById(entity.getId()));
......@@ -87,6 +102,24 @@ public class ReferralRecordController extends BaseController<ReferralRecordServi
return ApiResponse.ok(this.service.saveBatch(entityList));
}
@Override
public ApiResponse<IPage<ReferralRecord>> selectByPage(ReferralRecordParam param,
@RequestParam(value = "orderByClause", defaultValue = "id desc") String orderByClause,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
IPage<ReferralRecord> page = new Page<>(pageNum, pageSize);
QueryWrapper<ReferralRecord> wrapper = new QueryWrapper<ReferralRecord>()
.eq("out_doctor_id", param.getDoctorId())
.or()
.eq("in_doctor_id", param.getDoctorId())
.eq("audit_state", AuditStateEnum.AUDIT_SUCCESS)
.orderByDesc("create_time");
return ApiResponse.ok(this.service.page(page, wrapper));
}
/**
* 审核
*/
......@@ -96,5 +129,17 @@ public class ReferralRecordController extends BaseController<ReferralRecordServi
return ApiResponse.ok(this.service.audit(entity));
}
/**
* 用户查询转诊记录
*/
@PostMapping("/listMyRecord/{userInfoId}")
@Operation(summary = "用户查询转诊记录")
public ApiResponse listMyRecord(@PathVariable("userInfoId") Long userInfoId,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
Page<ReferralRecord> page = new Page<>(pageNum, pageSize);
return ApiResponse.ok(this.service.listMyRecord(page,userInfoId));
}
}
......@@ -17,6 +17,7 @@ import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import com.xwd.hospital.server.base.BaseParam;
import com.xwd.hospital.server.enums.AuditStateEnum;
import com.xwd.hospital.server.domain.DoctorFamilyAddressInfo;
@Data
......@@ -70,6 +71,26 @@ public class DoctorFamilyAddressInfoParam extends BaseParam<DoctorFamilyAddressI
*/
@Parameter(description = "详细地址")
private String detailAddress;
/**
* 审核状态
*/
@Parameter(description = "审核状态")
private AuditStateEnum auditState;
/**
* 审核状态 IN值List
*/
@Parameter(description = "审核状态 IN值List")
private List<String> auditStateList;
/**
* 审核人Id
*/
@Parameter(description = "审核人Id")
private Long auditId;
/**
* 失败原因
*/
@Parameter(description = "失败原因")
private String rejectReason;
/**
* 操作人Id
*/
......@@ -201,6 +222,20 @@ public class DoctorFamilyAddressInfoParam extends BaseParam<DoctorFamilyAddressI
wrapper.eq(columnPrefix + "detail_address", this.getDetailAddress());
}
}
wrapper.eq(this.getAuditState() != null, columnPrefix + "audit_state", this.getAuditState());
wrapper.in(this.getAuditStateList() != null && this.getAuditStateList().size() > 0, columnPrefix + "audit_state", this.getAuditStateList());
wrapper.eq(this.getAuditId() != null, columnPrefix + "audit_id", this.getAuditId());
if (this.getRejectReason() != null) {
if (this.getRejectReason().startsWith("%") && this.getRejectReason().endsWith("%")) {
wrapper.like(columnPrefix + "reject_reason", this.getRejectReason().substring(1, this.getRejectReason().length() - 1));
} else if (this.getRejectReason().startsWith("%") && !this.getRejectReason().endsWith("%")) {
wrapper.likeLeft(columnPrefix + "reject_reason", this.getRejectReason().substring(1));
} else if (this.getRejectReason().endsWith("%")) {
wrapper.likeRight(columnPrefix + "reject_reason", this.getRejectReason().substring(0, this.getRejectReason().length() - 1));
} else {
wrapper.eq(columnPrefix + "reject_reason", this.getRejectReason());
}
}
wrapper.eq(this.getEditorId() != null, columnPrefix + "editor_id", this.getEditorId());
if (this.getEditorName() != null) {
if (this.getEditorName().startsWith("%") && this.getEditorName().endsWith("%")) {
......
......@@ -18,7 +18,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import com.xwd.hospital.server.base.BaseParam;
import com.xwd.hospital.server.enums.SexTypeEnum;
import com.xwd.hospital.server.enums.AuditStateEnum;
import com.xwd.hospital.server.enums.FamilyDoctorStateEnum;
import com.xwd.hospital.server.domain.FamilyDoctor;
@Data
......@@ -78,15 +78,25 @@ public class FamilyDoctorParam extends BaseParam<FamilyDoctor> {
@Parameter(description = "家庭地址")
private String familyAddress;
/**
* 审核状态
* 家庭医生状态
*/
@Parameter(description = "审核状态")
private AuditStateEnum auditState;
@Parameter(description = "家庭医生状态")
private FamilyDoctorStateEnum auditState;
/**
* 审核状态 IN值List
* 家庭医生状态 IN值List
*/
@Parameter(description = "审核状态 IN值List")
@Parameter(description = "家庭医生状态 IN值List")
private List<String> auditStateList;
/**
* 审核人Id
*/
@Parameter(description = "审核人Id")
private Long auditId;
/**
* 失败原因
*/
@Parameter(description = "失败原因")
private String rejectReason;
/**
* 相关联的家庭医生Id
*/
......@@ -216,6 +226,18 @@ public class FamilyDoctorParam extends BaseParam<FamilyDoctor> {
}
wrapper.eq(this.getAuditState() != null, columnPrefix + "audit_state", this.getAuditState());
wrapper.in(this.getAuditStateList() != null && this.getAuditStateList().size() > 0, columnPrefix + "audit_state", this.getAuditStateList());
wrapper.eq(this.getAuditId() != null, columnPrefix + "audit_id", this.getAuditId());
if (this.getRejectReason() != null) {
if (this.getRejectReason().startsWith("%") && this.getRejectReason().endsWith("%")) {
wrapper.like(columnPrefix + "reject_reason", this.getRejectReason().substring(1, this.getRejectReason().length() - 1));
} else if (this.getRejectReason().startsWith("%") && !this.getRejectReason().endsWith("%")) {
wrapper.likeLeft(columnPrefix + "reject_reason", this.getRejectReason().substring(1));
} else if (this.getRejectReason().endsWith("%")) {
wrapper.likeRight(columnPrefix + "reject_reason", this.getRejectReason().substring(0, this.getRejectReason().length() - 1));
} else {
wrapper.eq(columnPrefix + "reject_reason", this.getRejectReason());
}
}
wrapper.eq(this.getDoctorId() != null, columnPrefix + "doctor_id", this.getDoctorId());
wrapper.eq(this.getEditorId() != null, columnPrefix + "editor_id", this.getEditorId());
if (this.getEditorName() != null) {
......
......@@ -36,11 +36,6 @@ public class ReferralRecordParam extends BaseParam<ReferralRecord> {
*/
@Parameter(description = "Id IN值List")
private List<Long> idList;
/**
* 用户Id
*/
@Parameter(description = "用户Id")
private Long userInfoId;
/**
* 患者Id
*/
......@@ -56,6 +51,21 @@ public class ReferralRecordParam extends BaseParam<ReferralRecord> {
*/
@Parameter(description = "转入医院Id")
private Long inHospitalId;
/**
* 转出医生Id
*/
@Parameter(description = "转出医生Id")
private Long outDoctorId;
/**
* 转入医生Id
*/
@Parameter(description = "转入医生Id")
private Long inDoctorId;
/**
* 转诊医生Id
*/
@Parameter(description = "转诊医生Id")
private Long doctorId;
/**
* 审核状态
*/
......@@ -135,10 +145,12 @@ public class ReferralRecordParam extends BaseParam<ReferralRecord> {
QueryWrapper<ReferralRecord> wrapper = Wrappers.<ReferralRecord>query();
wrapper.eq(this.getId() != null, columnPrefix + "id", this.getId());
wrapper.in(this.getIdList() != null && this.getIdList().size() > 0, columnPrefix + "id", this.getIdList());
wrapper.eq(this.getUserInfoId() != null, columnPrefix + "user_info_id", this.getUserInfoId());
wrapper.eq(this.getPatientId() != null, columnPrefix + "patient_id", this.getPatientId());
wrapper.eq(this.getOutHospitalId() != null, columnPrefix + "out_hospital_id", this.getOutHospitalId());
wrapper.eq(this.getInHospitalId() != null, columnPrefix + "in_hospital_id", this.getInHospitalId());
wrapper.eq(this.getOutDoctorId() != null, columnPrefix + "out_doctor_id", this.getOutDoctorId());
wrapper.eq(this.getInDoctorId() != null, columnPrefix + "in_doctor_id", this.getInDoctorId());
wrapper.eq(this.getDoctorId() != null, columnPrefix + "doctor_id", this.getDoctorId());
wrapper.eq(this.getAuditState() != null, columnPrefix + "audit_state", this.getAuditState());
wrapper.in(this.getAuditStateList() != null && this.getAuditStateList().size() > 0, columnPrefix + "audit_state", this.getAuditStateList());
wrapper.eq(this.getAuditId() != null, columnPrefix + "audit_id", this.getAuditId());
......
......@@ -11,8 +11,10 @@ package com.xwd.hospital.server.service;
import java.util.List;
import com.xwd.hospital.server.base.BaseService;
import com.xwd.hospital.server.domain.DoctorFamilyAddressInfo;
import com.xwd.hospital.server.domain.User;
import com.xwd.hospital.server.rest.req.DoctorFamilyAddressInfoParam;
public interface DoctorFamilyAddressInfoService extends BaseService<DoctorFamilyAddressInfo> {
boolean auditPass(Long id, User user);
boolean auditFail(Long id,String rejectReason, User user);
}
......@@ -17,15 +17,17 @@ import com.xwd.hospital.server.domain.DoctorInfo;
import com.xwd.hospital.server.dto.DoctorDto;
import com.xwd.hospital.server.dto.DoctorInfoDto;
import com.xwd.hospital.server.dto.PatientInfoDto;
import com.xwd.hospital.server.dto.ReferralDoctorDto;
import com.xwd.hospital.server.rest.req.DoctorInfoParam;
import com.xwd.hospital.server.rest.req.DoctorSearchParam;
public interface DoctorInfoService extends BaseService<DoctorInfo> {
List<DoctorDto> queryDoctorList(DoctorSearchParam param);
IPage<DoctorDto> queryDoctorList(Page<DoctorDto> page,DoctorSearchParam param);
DoctorInfoDto queryDoctorDetail(Long doctorId);
IPage<PatientInfoDto> queryMyPatient(Page page);
DoctorInfoDto queryDoctorDetail(Long doctorId,Long userId);
IPage<PatientInfoDto> queryMyPatient(Page<PatientInfoDto> page,String patientName);
IPage<ReferralDoctorDto> queryDoctorByHospitalId(Page<ReferralDoctorDto> page, Long hospitalId,String doctorName);
}
......@@ -11,8 +11,15 @@ package com.xwd.hospital.server.service;
import java.util.List;
import com.xwd.hospital.server.base.BaseService;
import com.xwd.hospital.server.domain.FamilyDoctor;
import com.xwd.hospital.server.domain.User;
import com.xwd.hospital.server.rest.req.FamilyDoctorParam;
public interface FamilyDoctorService extends BaseService<FamilyDoctor> {
boolean confirm(Long id, User user);
boolean reject(Long id,String rejectReason, User user);
boolean auditPass(Long id, User user);
boolean auditFail(Long id,String rejectReason, User user);
}
......@@ -18,4 +18,6 @@ import com.xwd.hospital.server.rest.req.MedicalQualificationsParam;
public interface MedicalQualificationsService extends BaseService<MedicalQualifications> {
DoctorInfo uploadQualification(MedicalQualificationDto dto);
boolean deleteQualification(Long id);
}
......@@ -9,6 +9,9 @@
package com.xwd.hospital.server.service;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xwd.hospital.server.base.BaseService;
import com.xwd.hospital.server.domain.ReferralRecord;
import com.xwd.hospital.server.rest.req.ReferralRecordParam;
......@@ -16,4 +19,6 @@ import com.xwd.hospital.server.rest.req.ReferralRecordParam;
public interface ReferralRecordService extends BaseService<ReferralRecord> {
boolean audit(ReferralRecord entity);
IPage<ReferralRecord> listMyRecord(Page<ReferralRecord> page, Long userInfoId);
}
......@@ -13,6 +13,11 @@ import java.util.List;
import java.util.ArrayList;
import java.util.Collection;
import com.xwd.hospital.server.domain.FamilyDoctor;
import com.xwd.hospital.server.domain.User;
import com.xwd.hospital.server.enums.AuditStateEnum;
import com.xwd.hospital.server.enums.FamilyDoctorStateEnum;
import com.xwd.hospital.server.rest.res.ApiCode;
import jakarta.annotation.Resource;
import com.baomidou.mybatisplus.core.enums.SqlMethod;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
......@@ -48,5 +53,36 @@ public class DoctorFamilyAddressInfoServiceImpl extends ServiceImpl<DoctorFamily
return executeBatch(entityList, batchSize, (sqlSession, entity) -> sqlSession.insert(sqlStatement, entity));
}
@Override
public boolean auditPass(Long id, User user) {
DoctorFamilyAddressInfo record = this.getById(id);
if (null == record){
throw new ApiCode.ApiException(-1,"数据不存在");
}else {
if(record.getAuditState() != AuditStateEnum.TO_AUDIT){
throw new ApiCode.ApiException(-1,"数据状态不正确");
}
record.setAuditState(AuditStateEnum.AUDIT_SUCCESS);
record.setAuditId(user.getId());
this.updateById(record);
}
return false;
}
@Override
public boolean auditFail(Long id, String rejectReason,User user) {
DoctorFamilyAddressInfo record = this.getById(id);
if (null == record){
throw new ApiCode.ApiException(-1,"数据不存在");
}else {
if(record.getAuditState() != AuditStateEnum.TO_AUDIT){
throw new ApiCode.ApiException(-1,"数据状态不正确");
}
record.setAuditState(AuditStateEnum.AUDIT_FAIL);
record.setRejectReason(rejectReason);
record.setAuditId(user.getId());
this.updateById(record);
}
return false;
}
}
......@@ -18,10 +18,7 @@ import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xwd.hospital.server.domain.*;
import com.xwd.hospital.server.dto.DiseaseDto;
import com.xwd.hospital.server.dto.DoctorDto;
import com.xwd.hospital.server.dto.DoctorInfoDto;
import com.xwd.hospital.server.dto.PatientInfoDto;
import com.xwd.hospital.server.dto.*;
import com.xwd.hospital.server.enums.DepartmentLevelEnum;
import com.xwd.hospital.server.enums.YesNoEnum;
import com.xwd.hospital.server.rest.req.DoctorSearchParam;
......@@ -69,9 +66,9 @@ public class DoctorInfoServiceImpl extends ServiceImpl<DoctorInfoMapper, DoctorI
}
@Override
public List<DoctorDto> queryDoctorList(DoctorSearchParam param) {
public IPage<DoctorDto> queryDoctorList(Page<DoctorDto> page,DoctorSearchParam param) {
List<Long> departmentIdList = new ArrayList<>();
if( null != param.getDepartmentId()){
if( null != param.getDepartmentId() && param.getDepartmentId() != 0){
DepartmentInfo department = departmentInfoService.getById(param.getDepartmentId());
if (null != department && department.getHiddenStatus() == YesNoEnum.NO ){
if (department.getDepartmentLevel() == DepartmentLevelEnum.FIRST_LEVEL) {
......@@ -89,51 +86,58 @@ public class DoctorInfoServiceImpl extends ServiceImpl<DoctorInfoMapper, DoctorI
}
}
//param传入一级菜单departmentId,同时此一级菜单下无二级菜单,此时应无医生可查询出
if(departmentIdList.size() == 0){
departmentIdList.add(0L);
}
// if(departmentIdList.size() == 0){
// departmentIdList.add(0L);
// }
return this.getBaseMapper().queryDoctorList(param.getSickness(),param.getDoctorName(),param.getDepartmentName(),departmentIdList);
// return this.getBaseMapper().queryDoctorList(param.getSickness(),param.getDoctorName(),param.getDepartmentName(),departmentIdList);
return this.getBaseMapper().queryDoctorListLikely(page,param.getDoctorName(),departmentIdList);
}
@Override
public DoctorInfoDto queryDoctorDetail(Long doctorId) {
public DoctorInfoDto queryDoctorDetail(Long doctorId,Long userId) {
//当前用户
Object userId = StpUtil.getExtra("userId");
UserInfo userInfo = userInfoService.getOne(Wrappers.<UserInfo>query().eq("user_id", Long.valueOf(userId.toString())));
if(null == userInfo){
return null;
}
// Object userId = StpUtil.getExtra("userId");
// UserInfo userInfo = userInfoService.getOne(Wrappers.<UserInfo>query().eq("user_id", Long.valueOf(userId.toString())));
// if(null == userInfo){
// return null;
// }
DoctorInfoDto doctorInfoDto = this.getBaseMapper().queryDoctorDetail(doctorId);
List<DoctorServiceInfo> doctorServiceInfoList = doctorServiceInfoService.list(Wrappers.<DoctorServiceInfo>query().eq("doctor_id", doctorId));
doctorInfoDto.setDoctorServiceInfoList(doctorServiceInfoList);
UserAttentionInfo attentionInfo = userAttentionInfoService.getOne(Wrappers.<UserAttentionInfo>query().eq("doctor_id", doctorId)
.eq("user_info_id", userInfo.getId()));
.eq("user_info_id", userId));
if(null != attentionInfo){
doctorInfoDto.setAttentionStatus(true);
doctorInfoDto.setAttentionId(attentionInfo.getId());
}else {
doctorInfoDto.setAttentionStatus(false);
}
List<DiseaseDto> diseaseDtos = this.getBaseMapper().queryDiseaseList(doctorId);
if (CollectionUtil.isEmpty(diseaseDtos)){
doctorInfoDto.setDiseaseList(new ArrayList<>());
}else {
doctorInfoDto.setDiseaseList(diseaseDtos);
}
// List<DiseaseDto> diseaseDtos = this.getBaseMapper().queryDiseaseList(doctorId);
// if (CollectionUtil.isEmpty(diseaseDtos)){
// doctorInfoDto.setDiseaseList(new ArrayList<>());
// }else {
// doctorInfoDto.setDiseaseList(diseaseDtos);
// }
return doctorInfoDto;
}
@Override
public IPage<PatientInfoDto> queryMyPatient(Page page) {
public IPage<PatientInfoDto> queryMyPatient(Page<PatientInfoDto> page,String patientName) {
Object userId = StpUtil.getExtra("userId");
DoctorInfo doctorInfo = this.getOne(Wrappers.<DoctorInfo>query().eq("user_id", Long.valueOf(userId.toString())));
if(null == doctorInfo){
return null;
}
return this.getBaseMapper().queryMyPatient(page,doctorInfo.getId());
return this.getBaseMapper().queryMyPatient(page,doctorInfo.getId(),patientName);
}
@Override
public IPage<ReferralDoctorDto> queryDoctorByHospitalId(Page<ReferralDoctorDto> page, Long hospitalId,String doctorName) {
return this.getBaseMapper().queryDoctorByHospitalId(page,hospitalId,doctorName);
}
}
......@@ -13,6 +13,9 @@ import java.util.List;
import java.util.ArrayList;
import java.util.Collection;
import com.xwd.hospital.server.domain.User;
import com.xwd.hospital.server.enums.FamilyDoctorStateEnum;
import com.xwd.hospital.server.rest.res.ApiCode;
import jakarta.annotation.Resource;
import com.baomidou.mybatisplus.core.enums.SqlMethod;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
......@@ -48,5 +51,65 @@ public class FamilyDoctorServiceImpl extends ServiceImpl<FamilyDoctorMapper, Fam
return executeBatch(entityList, batchSize, (sqlSession, entity) -> sqlSession.insert(sqlStatement, entity));
}
@Override
public boolean confirm(Long id,User user) {
FamilyDoctor record = this.getById(id);
if (null == record){
throw new ApiCode.ApiException(-1,"数据不存在");
}else {
if(record.getAuditState() != FamilyDoctorStateEnum.TO_CONFIRM){
throw new ApiCode.ApiException(-1,"数据状态不正确");
}
record.setAuditState(FamilyDoctorStateEnum.TO_AUDIT);
this.updateById(record);
}
return false;
}
@Override
public boolean reject(Long id, String rejectReason,User user) {
FamilyDoctor record = this.getById(id);
if (null == record){
throw new ApiCode.ApiException(-1,"数据不存在");
}else {
if(record.getAuditState() != FamilyDoctorStateEnum.TO_CONFIRM){
throw new ApiCode.ApiException(-1,"数据状态不正确");
}
record.setAuditState(FamilyDoctorStateEnum.REJECT);
record.setRejectReason(rejectReason);
this.updateById(record);
}
return false;
}
@Override
public boolean auditPass(Long id,User user) {
FamilyDoctor record = this.getById(id);
if (null == record){
throw new ApiCode.ApiException(-1,"数据不存在");
}else {
if(record.getAuditState() != FamilyDoctorStateEnum.TO_AUDIT){
throw new ApiCode.ApiException(-1,"数据状态不正确");
}
record.setAuditState(FamilyDoctorStateEnum.AUDIT_SUCCESS);
record.setAuditId(user.getId());
this.updateById(record);
}
return false;
}
@Override
public boolean auditFail(Long id, String rejectReason,User user) {
FamilyDoctor record = this.getById(id);
if (null == record){
throw new ApiCode.ApiException(-1,"数据不存在");
}else {
if(record.getAuditState() != FamilyDoctorStateEnum.TO_AUDIT){
throw new ApiCode.ApiException(-1,"数据状态不正确");
}
record.setAuditState(FamilyDoctorStateEnum.AUDIT_FAIL);
record.setRejectReason(rejectReason);
record.setAuditId(user.getId());
this.updateById(record);
}
return false;
}
}
......@@ -12,11 +12,13 @@ import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Objects;
import cn.dev33.satoken.stp.StpUtil;
import com.xwd.hospital.server.domain.*;
import com.xwd.hospital.server.dto.MedicalQualificationDto;
import com.xwd.hospital.server.enums.AuditStateEnum;
import com.xwd.hospital.server.rest.res.ApiCode;
import com.xwd.hospital.server.service.*;
import jakarta.annotation.Resource;
import com.baomidou.mybatisplus.core.enums.SqlMethod;
......@@ -103,4 +105,25 @@ public class MedicalQualificationsServiceImpl extends ServiceImpl<MedicalQualifi
doctorInfoService.saveOrUpdate(doctorInfo);
return doctorInfo;
}
@Override
public boolean deleteQualification(Long id) {
MedicalQualifications qual = this.getById(id);
if(Objects.isNull(qual)){
throw new ApiCode.ApiException(-1,"此记录不存在");
}
//修改医生信息
DoctorInfo doctorInfo = doctorInfoService.getById(qual.getDoctorId());
if(Objects.isNull(doctorInfo)){
throw new ApiCode.ApiException(-1,"此记录不存在");
}
doctorInfo.setMedicalQualificationId(null);
doctorInfoService.updateById(doctorInfo);
//删除原有的照片
pictureService.remove(Wrappers.<MedicalQualificationsPicture>query().eq("medical_qualification_id", id));
//删除医生资质信息
this.removeById(id);
return true;
}
}
......@@ -93,7 +93,7 @@ public class MedicalReportServiceImpl extends ServiceImpl<MedicalReportMapper, M
userInfoService.save(userInfo);
PatientInfo patientInfo = patientInfoService.getOne(Wrappers.<PatientInfo>query().eq("user_info_id", userInfo.getId())
.eq("relation", PatientRelationEnum.SELF).eq("id_no",dto.getPatientIdNo()));
.eq("relation", PatientRelationEnum.SELF).eq("id_no",dto.getPatientIdNo()).eq("delete_status", YesNoEnum.NO));
if(null == patientInfo){
//同时创建自身的就诊人
patientInfo = new PatientInfo();
......
......@@ -12,8 +12,17 @@ import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.Collection;
import java.util.stream.Collectors;
import cn.dev33.satoken.stp.StpUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xwd.hospital.server.domain.PatientInfo;
import com.xwd.hospital.server.enums.AuditStateEnum;
import com.xwd.hospital.server.enums.YesNoEnum;
import com.xwd.hospital.server.rest.res.ApiResponse;
import com.xwd.hospital.server.service.PatientInfoService;
import jakarta.annotation.Resource;
import com.baomidou.mybatisplus.core.enums.SqlMethod;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
......@@ -30,6 +39,9 @@ import com.xwd.hospital.server.rest.req.ReferralRecordParam;
@Service
public class ReferralRecordServiceImpl extends ServiceImpl<ReferralRecordMapper, ReferralRecord> implements ReferralRecordService {
@Resource
private PatientInfoService patientInfoService;
@Override
public int updateAllFieldsById(ReferralRecord entity) {
return this.getBaseMapper().updateAllFieldsById(entity);
......@@ -55,4 +67,17 @@ public class ReferralRecordServiceImpl extends ServiceImpl<ReferralRecordMapper,
entity.setAuditId(Long.valueOf(userId.toString()));
return this.saveOrUpdate(entity);
}
@Override
public IPage<ReferralRecord> listMyRecord(Page<ReferralRecord> page, Long userInfoId) {
List<PatientInfo> patientInfoList = patientInfoService.lambdaQuery().eq(PatientInfo::getUserInfoId, userInfoId).eq(PatientInfo::getDeleteStatus, YesNoEnum.NO).list();
List<Long> patientIdList = patientInfoList.stream().map(PatientInfo::getId).collect(Collectors.toList());
if(null == patientIdList || patientIdList.size() == 0){
return null;
}
QueryWrapper<ReferralRecord> wrapper = new QueryWrapper<ReferralRecord>().in("patient_id", patientIdList)
.orderByDesc("create_time");
return this.page(page, wrapper);
}
}
......@@ -147,9 +147,32 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
@Override
public User register(User user, String roleName) {
user.setDefault().validate(true);
int letterCount = 0;
int digitCount = 0;
if (user.getUsername().length() < 5) {
throw new ApiCode.ApiException(-1, "用户名不能少于5位!");
}
if (StringUtils.isNumeric(user.getUsername())) {
throw new ApiCode.ApiException(-1, "用户名不能全为数字组成,需至少3位字母!");
}
for (char c : user.getUsername().toCharArray()) {
if (Character.isLetter(c)) {
letterCount++;
} else if (Character.isDigit(c)) {
digitCount++;
}
}
if(letterCount<3){
throw new ApiCode.ApiException(-1, "用户名中字母数量不可少于3位!");
}
if (user.getPassword() == null) {
throw new ApiCode.ApiException(-1, "用户密码不能为空!");
}
if (user.getPassword().length() < 6) {
throw new ApiCode.ApiException(-1, "用户密码不能少于6位!");
}
user.setPassword(SaSecureUtil.sha256(user.getPassword()));
// 判断用户名是否存在
User existUser = this.selectByUsername(user.getUsername());
......
......@@ -27,8 +27,8 @@ public class OrderTask {
*/
@Scheduled(cron = "* * * * * *")
public void cancelUnpayOrder(){
log.info("清理超时未支付订单--------------------start");
delayQueueService.pollAndProcessDelayedMessages();
log.info("清理超时未支付订单--------------------end");
}
}
......@@ -29,7 +29,7 @@ spring:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
maximum-pool-size: 2
maximum-pool-size: 10
connection-timeout: 600000
minimum-idle: 10
max-lifetime: 540000
......@@ -67,6 +67,13 @@ server:
error:
whitelabel:
enabled: false
tomcat:
max-connections: 10000
threads:
max: 2000
min-spare: 1500
accept-count: 2000
connection-timeout: 30000
# Swagger
springdoc:
swagger-ui:
......
......@@ -14,6 +14,12 @@
from pms_doctor_info
where id = #{id}
</select>
<select id="selectByDoctorId" parameterType="java.io.Serializable" resultMap="ListResultMap">
select
<include refid="com.xwd.hospital.server.repository.base.DoctorInfoBaseMapper.Base_Column_List_Full" />
from pms_doctor_info
where id = #{id}
</select>
<!-- 根据Wrapper查询 -->
<select id="selectOne" resultMap="ResultMap">
select
......@@ -78,6 +84,47 @@
GROUP BY di.id, di.doctor_name, h.hospital_name, pdi.department_name, di.expertise_area, di.introduction, pmq.title, u.avatar, s.service_price
</select>
<select id="queryDoctorListLikely" resultType="com.xwd.hospital.server.dto.DoctorDto">
select
di.id as doctorId,
di.doctor_name,
h.hospital_name,
pdi.department_name,
di.expertise_area,
di.introduction,
pmq.title,
u.avatar,
s.service_price,
count(DISTINCT o.id) as orderCount,
count(DISTINCT ua.id) as fansCount
from pms_doctor_info di
inner join pms_medical_qualifications pmq on di.medical_qualification_id = pmq.id
inner join pms_hospital_info h on h.id = pmq.hospital_id
inner join pms_department_info pdi on pdi.id = pmq.department_id
inner join sys_user u on di.user_id = u.id
left join pms_order o on o.doctor_id = di.id
left join pms_doctor_service_info s on s.doctor_id = di.id
left join pms_user_attention_info ua on ua.doctor_id = di.id
where di.doctor_state = 'NORMAL' and pmq.audit_state = 'AUDIT_SUCCESS' and pdi.hidden_status = 'NO' and u.user_type = 'DOCTOR' and s.service_name = 'ONLINE_INQUIRY'
<if test="keyword != null and keyword != ''">
AND (
di.doctor_name LIKE CONCAT('%', #{keyword}, '%')
OR h.hospital_name LIKE CONCAT('%', #{keyword}, '%')
OR pdi.department_name LIKE CONCAT('%', #{keyword}, '%')
OR di.expertise_area LIKE CONCAT('%', #{keyword}, '%')
)
</if>
<if test="departmentIdList != null">
<if test="departmentIdList.size() > 0">
AND pmq.department_id in
<foreach collection="departmentIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</if>
GROUP BY di.id, di.doctor_name, h.hospital_name, pdi.department_name, di.expertise_area, di.introduction, pmq.title, u.avatar, s.service_price
</select>
<!-- 小程序查询医生详情 -->
<select id="queryDoctorDetail" resultType="com.xwd.hospital.server.dto.DoctorInfoDto">
select
......@@ -123,6 +170,30 @@
from pms_order o
left JOIN pms_patient_info p on p.id = o.patient_id
WHERE o.doctor_id = #{doctorId} and p.delete_status = 'NO'
<if test="patientName != null and patientName != ''">
AND p.patient_name LIKE CONCAT('%', #{patientName}, '%')
</if>
GROUP BY p.id
</select>
<select id="queryDoctorByHospitalId" resultType="com.xwd.hospital.server.dto.ReferralDoctorDto">
select
di.id as doctorId,
di.doctor_name,
h.hospital_name,
pdi.department_name,
pmq.title,
u.avatar
from pms_doctor_info di
inner join pms_medical_qualifications pmq on di.medical_qualification_id = pmq.id
inner join pms_hospital_info h on h.id = pmq.hospital_id
inner join pms_department_info pdi on pdi.id = pmq.department_id
inner join sys_user u on di.user_id = u.id
where di.doctor_state = 'NORMAL' and pmq.audit_state = 'AUDIT_SUCCESS' and pdi.hidden_status = 'NO'
and u.user_type = 'DOCTOR' and h.id = #{hospitalId}
<if test="doctorName != null and doctorName != ''">
AND di.doctor_name LIKE CONCAT('%', #{doctorName}, '%')
</if>
</select>
</mapper>
......@@ -14,6 +14,14 @@
from pms_hospital_info
where id = #{id}
</select>
<select id="selectByHospitalId" parameterType="java.io.Serializable" resultMap="ListResultMap">
select
<include refid="com.xwd.hospital.server.repository.base.HospitalInfoBaseMapper.Base_Column_List_Full" />
from pms_hospital_info
where id = #{id}
</select>
<!-- 根据Wrapper查询 -->
<select id="selectOne" resultMap="ResultMap">
select
......
......@@ -57,7 +57,7 @@
from pms_order po
left join pms_doctor_info pdi on po.doctor_id = pdi.id
left join sys_user su on pdi.user_id = su.id
where po.user_info_id = #{userInfoId} and su.user_type = 'DOCTOR'
where su.user_type = 'DOCTOR' and po.user_info_id = #{userInfoId}
<if test="state != null and state != 'COMPLETED'">
AND po.order_state = #{state}
</if>
......
......@@ -14,6 +14,13 @@
from pms_patient_info
where id = #{id}
</select>
<select id="selectByPatientId" parameterType="java.io.Serializable" resultMap="ListResultMap">
select
<include refid="com.xwd.hospital.server.repository.base.PatientInfoBaseMapper.Base_Column_List" />
from pms_patient_info
where id = #{id}
</select>
<!-- 根据Wrapper查询 -->
<select id="selectOne" resultMap="ResultMap">
select
......
......@@ -14,6 +14,12 @@
from pms_user_info
where id = #{id}
</select>
<select id="selectByUserId" parameterType="java.io.Serializable" resultMap="ListResultMap">
select
<include refid="com.xwd.hospital.server.repository.base.UserInfoBaseMapper.Base_Column_List" />
from pms_user_info
where id = #{id}
</select>
<!-- 根据Wrapper查询 -->
<select id="selectOne" resultMap="ResultMap">
select
......
......@@ -14,6 +14,12 @@
from sys_user
where id = #{id}
</select>
<select id="selectByUserId" parameterType="java.io.Serializable" resultMap="ListResultMap">
select
<include refid="com.xwd.hospital.server.repository.base.UserBaseMapper.Base_Column_List" />
from sys_user
where id = #{id}
</select>
<!-- 根据Wrapper查询 -->
<select id="selectOne" resultMap="ResultMap">
select
......
......@@ -10,6 +10,9 @@
<result column="city" jdbcType="VARCHAR" property="city" />
<result column="district" jdbcType="VARCHAR" property="district" />
<result column="detail_address" jdbcType="VARCHAR" property="detailAddress" />
<result column="audit_state" jdbcType="VARCHAR" property="auditState" />
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
<result column="reject_reason" jdbcType="VARCHAR" property="rejectReason" />
<result column="editor_id" jdbcType="BIGINT" property="editorId" />
<result column="editor_name" jdbcType="VARCHAR" property="editorName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
......@@ -17,22 +20,24 @@
</resultMap>
<resultMap id="ResultMap" type="com.xwd.hospital.server.domain.DoctorFamilyAddressInfo" extends="BaseResultMap">
<association column="doctor_id" property="doctor" javaType="com.xwd.hospital.server.domain.DoctorInfo"
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectById" />
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectByDoctorId" />
<association column="audit_id" property="audit" javaType="com.xwd.hospital.server.domain.User"
select="com.xwd.hospital.server.repository.UserMapper.selectByUserId" />
</resultMap>
<sql id="Base_Column_List">
`id`, `doctor_id`, `name`, `phone_number`, `province`, `city`, `district`, `detail_address`, `editor_id`, `editor_name`, `create_time`, `update_time`
`id`, `doctor_id`, `name`, `phone_number`, `province`, `city`, `district`, `detail_address`, `audit_state`, `audit_id`, `reject_reason`, `editor_id`, `editor_name`, `create_time`, `update_time`
</sql>
<sql id="Base_Column_List_With_Prefix">
t.`id`, t.`doctor_id`, t.`name`, t.`phone_number`, t.`province`, t.`city`, t.`district`, t.`detail_address`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
t.`id`, t.`doctor_id`, t.`name`, t.`phone_number`, t.`province`, t.`city`, t.`district`, t.`detail_address`, t.`audit_state`, t.`audit_id`, t.`reject_reason`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
</sql>
<insert id="batchInsert">
insert into pms_doctor_family_address_info (
`doctor_id`, `name`, `phone_number`, `province`, `city`, `district`, `detail_address`, `editor_id`, `editor_name`
`doctor_id`, `name`, `phone_number`, `province`, `city`, `district`, `detail_address`, `audit_state`, `audit_id`, `reject_reason`, `editor_id`, `editor_name`
)
values
<foreach collection="records" item="record" separator=",">
(
#{record.doctorId, jdbcType=BIGINT}, #{record.name, jdbcType=VARCHAR}, #{record.phoneNumber, jdbcType=VARCHAR}, #{record.province, jdbcType=VARCHAR}, #{record.city, jdbcType=VARCHAR}, #{record.district, jdbcType=VARCHAR}, #{record.detailAddress, jdbcType=VARCHAR}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
#{record.doctorId, jdbcType=BIGINT}, #{record.name, jdbcType=VARCHAR}, #{record.phoneNumber, jdbcType=VARCHAR}, #{record.province, jdbcType=VARCHAR}, #{record.city, jdbcType=VARCHAR}, #{record.district, jdbcType=VARCHAR}, #{record.detailAddress, jdbcType=VARCHAR}, #{record.auditState, jdbcType=VARCHAR}, #{record.auditId, jdbcType=BIGINT}, #{record.rejectReason, jdbcType=VARCHAR}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
)
</foreach>
</insert>
......@@ -46,6 +51,9 @@
city = #{et.city, jdbcType=VARCHAR},
district = #{et.district, jdbcType=VARCHAR},
detail_address = #{et.detailAddress, jdbcType=VARCHAR},
audit_state = #{et.auditState, jdbcType=VARCHAR},
audit_id = #{et.auditId, jdbcType=BIGINT},
reject_reason = #{et.rejectReason, jdbcType=VARCHAR},
editor_id = #{et.editorId, jdbcType=BIGINT},
editor_name = #{et.editorName, jdbcType=VARCHAR},
</trim>
......
......@@ -23,7 +23,7 @@
<resultMap id="ResultMap" type="com.xwd.hospital.server.domain.DoctorInfo" extends="BaseResultMap">
<result column="introduction" jdbcType="VARCHAR" property="introduction" />
<association column="user_id" property="user" javaType="com.xwd.hospital.server.domain.User"
select="com.xwd.hospital.server.repository.UserMapper.selectById" />
select="com.xwd.hospital.server.repository.UserMapper.selectByUserId" />
<association column="medical_qualification_id" property="medicalQualification" javaType="com.xwd.hospital.server.domain.MedicalQualifications"
select="com.xwd.hospital.server.repository.MedicalQualificationsMapper.selectById" />
</resultMap>
......
......@@ -16,8 +16,8 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap id="ResultMap" type="com.xwd.hospital.server.domain.DoctorServiceInfo" extends="BaseResultMap">
<association column="doctor_id" property="doctor" javaType="com.xwd.hospital.server.domain.DoctorInfo"
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectById" />
<!-- <association column="doctor_id" property="doctor" javaType="com.xwd.hospital.server.domain.DoctorInfo"-->
<!-- select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectById" />-->
</resultMap>
<sql id="Base_Column_List">
`id`, `doctor_id`, `service_name`, `service_price`, `service_state`, `service_start_time`, `service_end_time`, `service_phone_number`, `editor_id`, `editor_name`, `create_time`, `update_time`
......
......@@ -11,6 +11,8 @@
<result column="phone_number" jdbcType="VARCHAR" property="phoneNumber" />
<result column="family_address" jdbcType="VARCHAR" property="familyAddress" />
<result column="audit_state" jdbcType="VARCHAR" property="auditState" />
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
<result column="reject_reason" jdbcType="VARCHAR" property="rejectReason" />
<result column="doctor_id" jdbcType="BIGINT" property="doctorId" />
<result column="editor_id" jdbcType="BIGINT" property="editorId" />
<result column="editor_name" jdbcType="VARCHAR" property="editorName" />
......@@ -18,25 +20,27 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap id="ResultMap" type="com.xwd.hospital.server.domain.FamilyDoctor" extends="BaseResultMap">
<association column="user_info_id" property="userInfo" javaType="com.xwd.hospital.server.domain.UserInfo"
select="com.xwd.hospital.server.repository.UserInfoMapper.selectById" />
<!-- <association column="user_info_id" property="userInfo" javaType="com.xwd.hospital.server.domain.UserInfo"-->
<!-- select="com.xwd.hospital.server.repository.UserInfoMapper.selectById" />-->
<association column="audit_id" property="audit" javaType="com.xwd.hospital.server.domain.User"
select="com.xwd.hospital.server.repository.UserMapper.selectByUserId" />
<association column="doctor_id" property="doctor" javaType="com.xwd.hospital.server.domain.DoctorInfo"
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectById" />
</resultMap>
<sql id="Base_Column_List">
`id`, `user_info_id`, `name`, `sex`, `id_no`, `born_date`, `phone_number`, `family_address`, `audit_state`, `doctor_id`, `editor_id`, `editor_name`, `create_time`, `update_time`
`id`, `user_info_id`, `name`, `sex`, `id_no`, `born_date`, `phone_number`, `family_address`, `audit_state`, `audit_id`, `reject_reason`, `doctor_id`, `editor_id`, `editor_name`, `create_time`, `update_time`
</sql>
<sql id="Base_Column_List_With_Prefix">
t.`id`, t.`user_info_id`, t.`name`, t.`sex`, t.`id_no`, t.`born_date`, t.`phone_number`, t.`family_address`, t.`audit_state`, t.`doctor_id`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
t.`id`, t.`user_info_id`, t.`name`, t.`sex`, t.`id_no`, t.`born_date`, t.`phone_number`, t.`family_address`, t.`audit_state`, t.`audit_id`, t.`reject_reason`, t.`doctor_id`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
</sql>
<insert id="batchInsert">
insert into pms_family_doctor (
`user_info_id`, `name`, `sex`, `id_no`, `born_date`, `phone_number`, `family_address`, `audit_state`, `doctor_id`, `editor_id`, `editor_name`
`user_info_id`, `name`, `sex`, `id_no`, `born_date`, `phone_number`, `family_address`, `audit_state`, `audit_id`, `reject_reason`, `doctor_id`, `editor_id`, `editor_name`
)
values
<foreach collection="records" item="record" separator=",">
(
#{record.userInfoId, jdbcType=BIGINT}, #{record.name, jdbcType=VARCHAR}, #{record.sex, jdbcType=VARCHAR}, #{record.idNo, jdbcType=VARCHAR}, #{record.bornDate, jdbcType=VARCHAR}, #{record.phoneNumber, jdbcType=VARCHAR}, #{record.familyAddress, jdbcType=VARCHAR}, #{record.auditState, jdbcType=VARCHAR}, #{record.doctorId, jdbcType=BIGINT}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
#{record.userInfoId, jdbcType=BIGINT}, #{record.name, jdbcType=VARCHAR}, #{record.sex, jdbcType=VARCHAR}, #{record.idNo, jdbcType=VARCHAR}, #{record.bornDate, jdbcType=VARCHAR}, #{record.phoneNumber, jdbcType=VARCHAR}, #{record.familyAddress, jdbcType=VARCHAR}, #{record.auditState, jdbcType=VARCHAR}, #{record.auditId, jdbcType=BIGINT}, #{record.rejectReason, jdbcType=VARCHAR}, #{record.doctorId, jdbcType=BIGINT}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
)
</foreach>
</insert>
......@@ -51,6 +55,8 @@
phone_number = #{et.phoneNumber, jdbcType=VARCHAR},
family_address = #{et.familyAddress, jdbcType=VARCHAR},
audit_state = #{et.auditState, jdbcType=VARCHAR},
audit_id = #{et.auditId, jdbcType=BIGINT},
reject_reason = #{et.rejectReason, jdbcType=VARCHAR},
doctor_id = #{et.doctorId, jdbcType=BIGINT},
editor_id = #{et.editorId, jdbcType=BIGINT},
editor_name = #{et.editorName, jdbcType=VARCHAR},
......
......@@ -37,9 +37,9 @@
<resultMap id="ResultMap" type="com.xwd.hospital.server.domain.Order" extends="BaseResultMap">
<result column="patient_self_introduce" jdbcType="VARCHAR" property="patientSelfIntroduce" />
<association column="user_info_id" property="userInfo" javaType="com.xwd.hospital.server.domain.UserInfo"
select="com.xwd.hospital.server.repository.UserInfoMapper.selectById" />
select="com.xwd.hospital.server.repository.UserInfoMapper.selectByUserId" />
<association column="doctor_id" property="doctor" javaType="com.xwd.hospital.server.domain.DoctorInfo"
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectById" />
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectByDoctorId" />
<!-- <association column="patient_id" property="patient" javaType="com.xwd.hospital.server.domain.PatientInfo"-->
<!-- select="com.xwd.hospital.server.repository.PatientInfoMapper.selectById" />-->
<!-- <association column="user_coupon_id" property="userCoupon" javaType="com.xwd.hospital.server.domain.UserCouponInfo"-->
......
......@@ -3,10 +3,12 @@
<mapper namespace="com.xwd.hospital.server.repository.base.ReferralRecordBaseMapper">
<resultMap id="BaseResultMap" type="com.xwd.hospital.server.domain.ReferralRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_info_id" jdbcType="BIGINT" property="userInfoId" />
<result column="patient_id" jdbcType="BIGINT" property="patientId" />
<result column="out_hospital_id" jdbcType="BIGINT" property="outHospitalId" />
<result column="in_hospital_id" jdbcType="BIGINT" property="inHospitalId" />
<result column="out_doctor_id" jdbcType="BIGINT" property="outDoctorId" />
<result column="in_doctor_id" jdbcType="BIGINT" property="inDoctorId" />
<result column="doctor_id" jdbcType="BIGINT" property="doctorId" />
<result column="audit_state" jdbcType="VARCHAR" property="auditState" />
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
<result column="editor_id" jdbcType="BIGINT" property="editorId" />
......@@ -15,41 +17,47 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap id="ResultMap" type="com.xwd.hospital.server.domain.ReferralRecord" extends="BaseResultMap">
<association column="user_info_id" property="userInfo" javaType="com.xwd.hospital.server.domain.UserInfo"
select="com.xwd.hospital.server.repository.UserInfoMapper.selectById" />
<association column="patient_id" property="patient" javaType="com.xwd.hospital.server.domain.PatientInfo"
select="com.xwd.hospital.server.repository.PatientInfoMapper.selectById" />
select="com.xwd.hospital.server.repository.PatientInfoMapper.selectByPatientId" />
<association column="out_hospital_id" property="outHospital" javaType="com.xwd.hospital.server.domain.HospitalInfo"
select="com.xwd.hospital.server.repository.HospitalInfoMapper.selectById" />
select="com.xwd.hospital.server.repository.HospitalInfoMapper.selectByHospitalId" />
<association column="in_hospital_id" property="inHospital" javaType="com.xwd.hospital.server.domain.HospitalInfo"
select="com.xwd.hospital.server.repository.HospitalInfoMapper.selectById" />
select="com.xwd.hospital.server.repository.HospitalInfoMapper.selectByHospitalId" />
<association column="out_doctor_id" property="outDoctor" javaType="com.xwd.hospital.server.domain.DoctorInfo"
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectByDoctorId" />
<association column="in_doctor_id" property="inDoctor" javaType="com.xwd.hospital.server.domain.DoctorInfo"
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectByDoctorId" />
<association column="doctor_id" property="doctor" javaType="com.xwd.hospital.server.domain.DoctorInfo"
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectByDoctorId" />
<association column="audit_id" property="audit" javaType="com.xwd.hospital.server.domain.User"
select="com.xwd.hospital.server.repository.UserMapper.selectById" />
select="com.xwd.hospital.server.repository.UserMapper.selectByUserId" />
</resultMap>
<sql id="Base_Column_List">
`id`, `user_info_id`, `patient_id`, `out_hospital_id`, `in_hospital_id`, `audit_state`, `audit_id`, `editor_id`, `editor_name`, `create_time`, `update_time`
`id`, `patient_id`, `out_hospital_id`, `in_hospital_id`, `out_doctor_id`, `in_doctor_id`, `doctor_id`, `audit_state`, `audit_id`, `editor_id`, `editor_name`, `create_time`, `update_time`
</sql>
<sql id="Base_Column_List_With_Prefix">
t.`id`, t.`user_info_id`, t.`patient_id`, t.`out_hospital_id`, t.`in_hospital_id`, t.`audit_state`, t.`audit_id`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
t.`id`, t.`patient_id`, t.`out_hospital_id`, t.`in_hospital_id`, t.`out_doctor_id`, t.`in_doctor_id`, t.`doctor_id`, t.`audit_state`, t.`audit_id`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
</sql>
<insert id="batchInsert">
insert into pms_referral_record (
`user_info_id`, `patient_id`, `out_hospital_id`, `in_hospital_id`, `audit_state`, `audit_id`, `editor_id`, `editor_name`
`patient_id`, `out_hospital_id`, `in_hospital_id`, `out_doctor_id`, `in_doctor_id`, `doctor_id`, `audit_state`, `audit_id`, `editor_id`, `editor_name`
)
values
<foreach collection="records" item="record" separator=",">
(
#{record.userInfoId, jdbcType=BIGINT}, #{record.patientId, jdbcType=BIGINT}, #{record.outHospitalId, jdbcType=BIGINT}, #{record.inHospitalId, jdbcType=BIGINT}, #{record.auditState, jdbcType=VARCHAR}, #{record.auditId, jdbcType=BIGINT}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
#{record.patientId, jdbcType=BIGINT}, #{record.outHospitalId, jdbcType=BIGINT}, #{record.inHospitalId, jdbcType=BIGINT}, #{record.outDoctorId, jdbcType=BIGINT}, #{record.inDoctorId, jdbcType=BIGINT}, #{record.doctorId, jdbcType=BIGINT}, #{record.auditState, jdbcType=VARCHAR}, #{record.auditId, jdbcType=BIGINT}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
)
</foreach>
</insert>
<update id="updateAllFieldsById" parameterType="com.xwd.hospital.server.domain.ReferralRecord">
update pms_referral_record set
<trim suffixOverrides=",">
user_info_id = #{et.userInfoId, jdbcType=BIGINT},
patient_id = #{et.patientId, jdbcType=BIGINT},
out_hospital_id = #{et.outHospitalId, jdbcType=BIGINT},
in_hospital_id = #{et.inHospitalId, jdbcType=BIGINT},
out_doctor_id = #{et.outDoctorId, jdbcType=BIGINT},
in_doctor_id = #{et.inDoctorId, jdbcType=BIGINT},
doctor_id = #{et.doctorId, jdbcType=BIGINT},
audit_state = #{et.auditState, jdbcType=VARCHAR},
audit_id = #{et.auditId, jdbcType=BIGINT},
editor_id = #{et.editorId, jdbcType=BIGINT},
......
......@@ -12,9 +12,9 @@
</resultMap>
<resultMap id="ResultMap" type="com.xwd.hospital.server.domain.UserAttentionInfo" extends="BaseResultMap">
<association column="user_info_id" property="userInfo" javaType="com.xwd.hospital.server.domain.UserInfo"
select="com.xwd.hospital.server.repository.UserInfoMapper.selectById" />
select="com.xwd.hospital.server.repository.UserInfoMapper.selectByUserId" />
<association column="doctor_id" property="doctor" javaType="com.xwd.hospital.server.domain.DoctorInfo"
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectById" />
select="com.xwd.hospital.server.repository.DoctorInfoMapper.selectByDoctorId" />
</resultMap>
<sql id="Base_Column_List">
`id`, `user_info_id`, `doctor_id`, `editor_id`, `editor_name`, `create_time`, `update_time`
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论