Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
medical-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
aiming-medical
medical-server
Commits
df029c88
提交
df029c88
authored
11月 01, 2023
作者:
zhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.develop
2.fix bug
上级
a7ed3cff
隐藏空白字符变更
内嵌
并排
正在显示
31 个修改的文件
包含
1591 行增加
和
11 行删除
+1591
-11
CouponSendRecord.java
...java/com/xwd/hospital/server/domain/CouponSendRecord.java
+230
-0
PatientInfo.java
...main/java/com/xwd/hospital/server/domain/PatientInfo.java
+15
-0
ReferralRecord.java
...n/java/com/xwd/hospital/server/domain/ReferralRecord.java
+219
-0
PatientInfoDto.java
...main/java/com/xwd/hospital/server/dto/PatientInfoDto.java
+17
-0
ReportTypeEnum.java
...in/java/com/xwd/hospital/server/enums/ReportTypeEnum.java
+28
-0
CouponSendRecordMapper.java
...wd/hospital/server/repository/CouponSendRecordMapper.java
+27
-0
DoctorInfoMapper.java
.../com/xwd/hospital/server/repository/DoctorInfoMapper.java
+4
-3
ReferralRecordMapper.java
.../xwd/hospital/server/repository/ReferralRecordMapper.java
+27
-0
CouponSendRecordBaseMapper.java
...al/server/repository/base/CouponSendRecordBaseMapper.java
+37
-0
ReferralRecordBaseMapper.java
...ital/server/repository/base/ReferralRecordBaseMapper.java
+37
-0
CouponSendRecordController.java
.../xwd/hospital/server/rest/CouponSendRecordController.java
+91
-0
DoctorInfoController.java
...va/com/xwd/hospital/server/rest/DoctorInfoController.java
+13
-0
ReferralRecordController.java
...om/xwd/hospital/server/rest/ReferralRecordController.java
+91
-0
CouponSendRecordParam.java
...m/xwd/hospital/server/rest/req/CouponSendRecordParam.java
+182
-0
PatientInfoParam.java
...va/com/xwd/hospital/server/rest/req/PatientInfoParam.java
+12
-0
ReferralRecordParam.java
...com/xwd/hospital/server/rest/req/ReferralRecordParam.java
+166
-0
CouponSendRecordService.java
.../xwd/hospital/server/service/CouponSendRecordService.java
+18
-0
DoctorInfoService.java
...va/com/xwd/hospital/server/service/DoctorInfoService.java
+6
-0
ReferralRecordService.java
...om/xwd/hospital/server/service/ReferralRecordService.java
+18
-0
CouponSendRecordServiceImpl.java
...ital/server/service/impl/CouponSendRecordServiceImpl.java
+52
-0
DoctorInfoServiceImpl.java
...d/hospital/server/service/impl/DoctorInfoServiceImpl.java
+13
-0
ReferralRecordServiceImpl.java
...spital/server/service/impl/ReferralRecordServiceImpl.java
+52
-0
application-dev.yml
src/main/resources/application-dev.yml
+2
-2
application-prod.yml
src/main/resources/application-prod.yml
+2
-2
V1.0.0__schema.sql
src/main/resources/db/migration/V1.0.0__schema.sql
+19
-0
CouponSendRecordMapper.xml
src/main/resources/mappers/CouponSendRecordMapper.xml
+39
-0
DoctorInfoMapper.xml
src/main/resources/mappers/DoctorInfoMapper.xml
+9
-0
ReferralRecordMapper.xml
src/main/resources/mappers/ReferralRecordMapper.xml
+39
-0
CouponSendRecordBaseMapper.xml
...ain/resources/mappers/base/CouponSendRecordBaseMapper.xml
+60
-0
PatientInfoBaseMapper.xml
src/main/resources/mappers/base/PatientInfoBaseMapper.xml
+6
-4
ReferralRecordBaseMapper.xml
src/main/resources/mappers/base/ReferralRecordBaseMapper.xml
+60
-0
没有找到文件。
src/main/java/com/xwd/hospital/server/domain/CouponSendRecord.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:优惠券发放记录表
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
domain
;
import
java.io.Serializable
;
import
com.xwd.hospital.server.rest.res.ApiCode
;
import
lombok.*
;
import
java.util.List
;
import
com.baomidou.mybatisplus.annotation.*
;
import
io.swagger.v3.oas.annotations.media.Schema
;
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.CouponTypeEnum
;
import
com.xwd.hospital.server.domain.CouponInfo
;
import
com.xwd.hospital.server.domain.UserCouponInfo
;
import
com.xwd.hospital.server.domain.User
;
import
com.xwd.hospital.server.domain.UserInfo
;
@Data
@Builder
(
builderMethodName
=
"newBuilder"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@NoArgsConstructor
@AllArgsConstructor
@TableName
(
"`pms_coupon_send_record`"
)
@Schema
(
name
=
"CouponSendRecord"
,
description
=
"优惠券发放记录表"
)
public
class
CouponSendRecord
extends
BaseDomain
{
/**
* Id
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@Schema
(
description
=
"Id"
,
nullable
=
false
)
private
Long
id
;
/**
* 优惠券Id
*/
@TableField
(
value
=
"coupon_id"
)
@Schema
(
description
=
"优惠券Id"
,
nullable
=
false
)
private
Long
couponId
;
/**
* 优惠券Id
*/
@Schema
(
description
=
"优惠券Id"
)
@TableField
(
exist
=
false
)
private
CouponInfo
coupon
;
/**
* 用户优惠券关系id
*/
@TableField
(
value
=
"user_coupon_id"
)
@Schema
(
description
=
"用户优惠券关系id"
,
nullable
=
false
)
private
Long
userCouponId
;
/**
* 用户优惠券关系id
*/
@Schema
(
description
=
"用户优惠券关系id"
)
@TableField
(
exist
=
false
)
private
UserCouponInfo
userCoupon
;
/**
* 优惠券名称
*/
@TableField
(
value
=
"coupon_name"
)
@Schema
(
description
=
"优惠券名称"
,
nullable
=
false
)
private
String
couponName
;
/**
* 优惠券类型
*/
@TableField
(
value
=
"coupon_type"
)
@Schema
(
description
=
"优惠券类型"
,
nullable
=
false
)
private
CouponTypeEnum
couponType
;
/**
* 优惠金额/折扣
*/
@TableField
(
value
=
"coupon_discount"
)
@Schema
(
description
=
"优惠金额/折扣"
,
nullable
=
false
)
private
java
.
math
.
BigDecimal
couponDiscount
;
/**
* 发放人员id
*/
@TableField
(
value
=
"send_id"
)
@Schema
(
description
=
"发放人员id"
,
nullable
=
false
)
private
Long
sendId
;
/**
* 发放人员id
*/
@Schema
(
description
=
"发放人员id"
)
@TableField
(
exist
=
false
)
private
User
send
;
/**
* 接收人员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
*/
@TableField
(
value
=
"editor_id"
)
@Schema
(
description
=
"操作人Id"
,
nullable
=
false
)
private
Long
editorId
;
/**
* 操作人
*/
@TableField
(
value
=
"editor_name"
)
@Schema
(
description
=
"操作人"
,
nullable
=
false
)
private
String
editorName
;
/**
* 创建时间
*/
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
,
nullable
=
false
)
private
java
.
util
.
Date
createTime
;
/**
* 更新时间
*/
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"更新时间"
,
nullable
=
false
)
private
java
.
util
.
Date
updateTime
;
/**
* 设置默认值
*/
@Override
public
CouponSendRecord
setDefault
()
{
if
(
this
.
getCouponType
()
==
null
)
{
this
.
setCouponType
(
CouponTypeEnum
.
FULL_DISCOUNT
);
}
if
(
this
.
getEditorId
()
==
null
)
{
this
.
setEditorId
(
1L
);
}
if
(
this
.
getEditorName
()
==
null
)
{
this
.
setEditorName
(
"admin"
);
}
if
(
this
.
getCreateTime
()
==
null
)
{
this
.
setCreateTime
(
new
java
.
util
.
Date
());
}
if
(
this
.
getUpdateTime
()
==
null
)
{
this
.
setUpdateTime
(
new
java
.
util
.
Date
());
}
return
this
;
}
/**
* 数据验证
*/
@Override
public
boolean
validate
(
boolean
throwException
)
{
if
(
this
.
getCouponId
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"优惠券Id不能为空!"
);
}
return
false
;
}
if
(
this
.
getUserCouponId
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"用户优惠券关系id不能为空!"
);
}
return
false
;
}
if
(
this
.
getCouponName
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"优惠券名称不能为空!"
);
}
return
false
;
}
if
(
this
.
getCouponType
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"优惠券类型不能为空!"
);
}
return
false
;
}
if
(
this
.
getCouponDiscount
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"优惠金额/折扣不能为空!"
);
}
return
false
;
}
if
(
this
.
getSendId
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"发放人员id不能为空!"
);
}
return
false
;
}
if
(
this
.
getUserInfoId
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"接收人员id不能为空!"
);
}
return
false
;
}
if
(
this
.
getEditorId
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"操作人Id不能为空!"
);
}
return
false
;
}
if
(
this
.
getEditorName
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"操作人不能为空!"
);
}
return
false
;
}
return
true
;
}
/**
* 数据验证
*/
@Override
public
boolean
validate
()
{
return
this
.
validate
(
false
);
}
}
src/main/java/com/xwd/hospital/server/domain/PatientInfo.java
浏览文件 @
df029c88
...
...
@@ -112,6 +112,12 @@ public class PatientInfo extends BaseDomain {
@TableField
(
value
=
"guardian_phone_number"
)
@Schema
(
description
=
"监护人手机号码"
)
private
String
guardianPhoneNumber
;
/**
* 是否删除
*/
@TableField
(
value
=
"delete_status"
)
@Schema
(
description
=
"是否删除"
,
nullable
=
false
)
private
YesNoEnum
deleteStatus
;
/**
* 操作人Id
*/
...
...
@@ -153,6 +159,9 @@ public class PatientInfo extends BaseDomain {
if
(
this
.
getGuardianState
()
==
null
)
{
this
.
setGuardianState
(
YesNoEnum
.
NO
);
}
if
(
this
.
getDeleteStatus
()
==
null
)
{
this
.
setDeleteStatus
(
YesNoEnum
.
NO
);
}
if
(
this
.
getEditorId
()
==
null
)
{
this
.
setEditorId
(
1L
);
}
...
...
@@ -209,6 +218,12 @@ public class PatientInfo extends BaseDomain {
}
return
false
;
}
if
(
this
.
getDeleteStatus
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"是否删除不能为空!"
);
}
return
false
;
}
if
(
this
.
getEditorId
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"操作人Id不能为空!"
);
...
...
src/main/java/com/xwd/hospital/server/domain/ReferralRecord.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:转诊记录
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
domain
;
import
java.io.Serializable
;
import
com.xwd.hospital.server.rest.res.ApiCode
;
import
lombok.*
;
import
java.util.List
;
import
com.baomidou.mybatisplus.annotation.*
;
import
io.swagger.v3.oas.annotations.media.Schema
;
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.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.User
;
@Data
@Builder
(
builderMethodName
=
"newBuilder"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@NoArgsConstructor
@AllArgsConstructor
@TableName
(
"`pms_referral_record`"
)
@Schema
(
name
=
"ReferralRecord"
,
description
=
"转诊记录"
)
public
class
ReferralRecord
extends
BaseDomain
{
/**
* Id
*/
@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
*/
@TableField
(
value
=
"patient_id"
)
@Schema
(
description
=
"患者Id"
,
nullable
=
false
)
private
Long
patientId
;
/**
* 患者Id
*/
@Schema
(
description
=
"患者Id"
)
@TableField
(
exist
=
false
)
private
PatientInfo
patient
;
/**
* 转出医院Id
*/
@TableField
(
value
=
"out_hospital_id"
)
@Schema
(
description
=
"转出医院Id"
,
nullable
=
false
)
private
Long
outHospitalId
;
/**
* 转出医院Id
*/
@Schema
(
description
=
"转出医院Id"
)
@TableField
(
exist
=
false
)
private
HospitalInfo
outHospital
;
/**
* 转入医院Id
*/
@TableField
(
value
=
"in_hospital_id"
)
@Schema
(
description
=
"转入医院Id"
,
nullable
=
false
)
private
Long
inHospitalId
;
/**
* 转入医院Id
*/
@Schema
(
description
=
"转入医院Id"
)
@TableField
(
exist
=
false
)
private
HospitalInfo
inHospital
;
/**
* 审核状态
*/
@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
;
/**
* 操作人Id
*/
@TableField
(
value
=
"editor_id"
)
@Schema
(
description
=
"操作人Id"
,
nullable
=
false
)
private
Long
editorId
;
/**
* 操作人
*/
@TableField
(
value
=
"editor_name"
)
@Schema
(
description
=
"操作人"
,
nullable
=
false
)
private
String
editorName
;
/**
* 创建时间
*/
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
,
nullable
=
false
)
private
java
.
util
.
Date
createTime
;
/**
* 更新时间
*/
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"更新时间"
,
nullable
=
false
)
private
java
.
util
.
Date
updateTime
;
/**
* 设置默认值
*/
@Override
public
ReferralRecord
setDefault
()
{
if
(
this
.
getAuditState
()
==
null
)
{
this
.
setAuditState
(
AuditStateEnum
.
TO_AUDIT
);
}
if
(
this
.
getEditorId
()
==
null
)
{
this
.
setEditorId
(
1L
);
}
if
(
this
.
getEditorName
()
==
null
)
{
this
.
setEditorName
(
"admin"
);
}
if
(
this
.
getCreateTime
()
==
null
)
{
this
.
setCreateTime
(
new
java
.
util
.
Date
());
}
if
(
this
.
getUpdateTime
()
==
null
)
{
this
.
setUpdateTime
(
new
java
.
util
.
Date
());
}
return
this
;
}
/**
* 数据验证
*/
@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不能为空!"
);
}
return
false
;
}
if
(
this
.
getOutHospitalId
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"转出医院Id不能为空!"
);
}
return
false
;
}
if
(
this
.
getInHospitalId
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"转入医院Id不能为空!"
);
}
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不能为空!"
);
}
return
false
;
}
if
(
this
.
getEditorName
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"操作人不能为空!"
);
}
return
false
;
}
return
true
;
}
/**
* 数据验证
*/
@Override
public
boolean
validate
()
{
return
this
.
validate
(
false
);
}
}
src/main/java/com/xwd/hospital/server/dto/PatientInfoDto.java
0 → 100644
浏览文件 @
df029c88
package
com
.
xwd
.
hospital
.
server
.
dto
;
import
com.xwd.hospital.server.enums.SexTypeEnum
;
import
lombok.Data
;
@Data
public
class
PatientInfoDto
{
private
Long
patientId
;
private
String
patientName
;
private
SexTypeEnum
sex
;
private
String
bornDate
;
}
src/main/java/com/xwd/hospital/server/enums/ReportTypeEnum.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
enums
;
/**
* 医生状态
*/
public
enum
ReportTypeEnum
{
CT
(
"CT报告"
),
INSEPCTION
(
"检验报告"
);
ReportTypeEnum
(
String
name
)
{
this
.
name
=
name
;
}
private
String
name
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
src/main/java/com/xwd/hospital/server/repository/CouponSendRecordMapper.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:优惠券发放记录表
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
repository
;
import
java.io.Serializable
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
import
com.xwd.hospital.server.domain.CouponSendRecord
;
import
com.xwd.hospital.server.repository.base.CouponSendRecordBaseMapper
;
@Repository
public
interface
CouponSendRecordMapper
extends
CouponSendRecordBaseMapper
{
}
src/main/java/com/xwd/hospital/server/repository/DoctorInfoMapper.java
浏览文件 @
df029c88
...
...
@@ -14,10 +14,10 @@ import java.util.List;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.xwd.hospital.server.dto.DiseaseDto
;
import
com.xwd.hospital.server.dto.DoctorDto
;
import
com.xwd.hospital.server.dto.DoctorInfoDto
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.xwd.hospital.server.dto.*
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
import
com.xwd.hospital.server.domain.DoctorInfo
;
...
...
@@ -36,4 +36,5 @@ public interface DoctorInfoMapper extends DoctorInfoBaseMapper {
String
selectNameById
(
Long
doctorId
);
List
<
DiseaseDto
>
queryDiseaseList
(
@Param
(
"doctorId"
)
Long
doctorId
);
IPage
<
PatientInfoDto
>
queryMyPatient
(
@Param
(
"page"
)
Page
<
PatientInfoDto
>
page
,
@Param
(
"doctorId"
)
Long
doctorId
);
}
src/main/java/com/xwd/hospital/server/repository/ReferralRecordMapper.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:转诊记录
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
repository
;
import
java.io.Serializable
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
import
com.xwd.hospital.server.domain.ReferralRecord
;
import
com.xwd.hospital.server.repository.base.ReferralRecordBaseMapper
;
@Repository
public
interface
ReferralRecordMapper
extends
ReferralRecordBaseMapper
{
}
src/main/java/com/xwd/hospital/server/repository/base/CouponSendRecordBaseMapper.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:优惠券发放记录表
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
repository
.
base
;
import
java.io.Serializable
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
import
com.xwd.hospital.server.domain.CouponSendRecord
;
@Repository
public
interface
CouponSendRecordBaseMapper
extends
BaseMapper
<
CouponSendRecord
>
{
/**
* 根据 ID 更新所有字段
*
* @param entity 实体对象
*/
int
updateAllFieldsById
(
@Param
(
Constants
.
ENTITY
)
CouponSendRecord
entity
);
/**
* 批量插入
*
* @param records 实体对象列表
*/
int
batchInsert
(
@Param
(
"records"
)
List
<
CouponSendRecord
>
records
);
}
src/main/java/com/xwd/hospital/server/repository/base/ReferralRecordBaseMapper.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:转诊记录
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
repository
.
base
;
import
java.io.Serializable
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
import
com.xwd.hospital.server.domain.ReferralRecord
;
@Repository
public
interface
ReferralRecordBaseMapper
extends
BaseMapper
<
ReferralRecord
>
{
/**
* 根据 ID 更新所有字段
*
* @param entity 实体对象
*/
int
updateAllFieldsById
(
@Param
(
Constants
.
ENTITY
)
ReferralRecord
entity
);
/**
* 批量插入
*
* @param records 实体对象列表
*/
int
batchInsert
(
@Param
(
"records"
)
List
<
ReferralRecord
>
records
);
}
src/main/java/com/xwd/hospital/server/rest/CouponSendRecordController.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:优惠券发放记录表
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
rest
;
import
java.util.List
;
import
java.util.Arrays
;
import
cn.dev33.satoken.stp.SaLoginModel
;
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.core.toolkit.Wrappers
;
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.User
;
import
com.xwd.hospital.server.rest.res.ApiCode
;
import
com.xwd.hospital.server.domain.CouponSendRecord
;
import
com.xwd.hospital.server.rest.req.CouponSendRecordParam
;
import
com.xwd.hospital.server.rest.res.ApiResponse
;
import
com.xwd.hospital.server.service.CouponSendRecordService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
jakarta.annotation.Resource
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springdoc.core.annotations.ParameterObject
;
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
@Tag
(
name
=
"CouponSendRecordController"
,
description
=
"优惠券发放记录表管理"
)
@RequestMapping
(
"/v1/pms/coupon-send-record"
)
public
class
CouponSendRecordController
extends
BaseController
<
CouponSendRecordService
,
CouponSendRecord
,
CouponSendRecordParam
>
{
@Resource
public
void
setService
(
CouponSendRecordService
service
)
{
this
.
service
=
service
;
}
/**
* 新增
*
* @param entity 要新增的对象
* @return 新增的对象
*/
@PostMapping
(
"/"
)
@Operation
(
summary
=
"新增"
)
@Override
public
ApiResponse
<
CouponSendRecord
>
add
(
@RequestBody
CouponSendRecord
entity
,
@AuthUser
User
user
)
{
entity
.
setEditorId
(
user
.
getId
());
entity
.
setEditorName
(
user
.
getUsername
());
entity
.
setDefault
().
validate
(
true
);
this
.
service
.
save
(
entity
);
return
ApiResponse
.
ok
(
this
.
service
.
getById
(
entity
.
getId
()));
}
/**
* 批量新增
*
* @param entityList 要新增的对象
* @return boolean 成功或失败
*/
@PostMapping
(
"/batch-save"
)
@Operation
(
summary
=
"批量新增"
)
@Override
public
ApiResponse
<
Boolean
>
batchSave
(
@RequestBody
List
<
CouponSendRecord
>
entityList
,
@AuthUser
User
user
)
{
entityList
.
forEach
(
entity
->
{
entity
.
setEditorId
(
user
.
getId
());
entity
.
setEditorName
(
user
.
getUsername
());
entity
.
setDefault
().
validate
(
true
);
});
return
ApiResponse
.
ok
(
this
.
service
.
saveBatch
(
entityList
));
}
}
src/main/java/com/xwd/hospital/server/rest/DoctorInfoController.java
浏览文件 @
df029c88
...
...
@@ -24,6 +24,7 @@ import com.xwd.hospital.server.base.BaseController;
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.rest.req.DoctorSearchParam
;
import
com.xwd.hospital.server.rest.res.ApiCode
;
import
com.xwd.hospital.server.domain.DoctorInfo
;
...
...
@@ -117,5 +118,17 @@ public class DoctorInfoController extends BaseController<DoctorInfoService, Doct
return
ApiResponse
.
ok
(
this
.
service
.
queryDoctorDetail
(
doctorId
));
}
/**
* 我的患者
*
*/
@GetMapping
(
"/queryMyPatient"
)
@Operation
(
summary
=
"我的患者"
)
public
ApiResponse
queryMyPatient
(
@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
));
}
}
src/main/java/com/xwd/hospital/server/rest/ReferralRecordController.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:转诊记录
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
rest
;
import
java.util.List
;
import
java.util.Arrays
;
import
cn.dev33.satoken.stp.SaLoginModel
;
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.core.toolkit.Wrappers
;
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.User
;
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.ReferralRecordService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
jakarta.annotation.Resource
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springdoc.core.annotations.ParameterObject
;
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
@Tag
(
name
=
"ReferralRecordController"
,
description
=
"转诊记录管理"
)
@RequestMapping
(
"/v1/pms/referral-record"
)
public
class
ReferralRecordController
extends
BaseController
<
ReferralRecordService
,
ReferralRecord
,
ReferralRecordParam
>
{
@Resource
public
void
setService
(
ReferralRecordService
service
)
{
this
.
service
=
service
;
}
/**
* 新增
*
* @param entity 要新增的对象
* @return 新增的对象
*/
@PostMapping
(
"/"
)
@Operation
(
summary
=
"新增"
)
@Override
public
ApiResponse
<
ReferralRecord
>
add
(
@RequestBody
ReferralRecord
entity
,
@AuthUser
User
user
)
{
entity
.
setEditorId
(
user
.
getId
());
entity
.
setEditorName
(
user
.
getUsername
());
entity
.
setDefault
().
validate
(
true
);
this
.
service
.
save
(
entity
);
return
ApiResponse
.
ok
(
this
.
service
.
getById
(
entity
.
getId
()));
}
/**
* 批量新增
*
* @param entityList 要新增的对象
* @return boolean 成功或失败
*/
@PostMapping
(
"/batch-save"
)
@Operation
(
summary
=
"批量新增"
)
@Override
public
ApiResponse
<
Boolean
>
batchSave
(
@RequestBody
List
<
ReferralRecord
>
entityList
,
@AuthUser
User
user
)
{
entityList
.
forEach
(
entity
->
{
entity
.
setEditorId
(
user
.
getId
());
entity
.
setEditorName
(
user
.
getUsername
());
entity
.
setDefault
().
validate
(
true
);
});
return
ApiResponse
.
ok
(
this
.
service
.
saveBatch
(
entityList
));
}
}
src/main/java/com/xwd/hospital/server/rest/req/CouponSendRecordParam.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:优惠券发放记录表
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
rest
.
req
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
lombok.*
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
com.xwd.hospital.server.base.BaseParam
;
import
com.xwd.hospital.server.enums.CouponTypeEnum
;
import
com.xwd.hospital.server.domain.CouponSendRecord
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Builder
(
builderMethodName
=
"newBuilder"
)
@NoArgsConstructor
@AllArgsConstructor
public
class
CouponSendRecordParam
extends
BaseParam
<
CouponSendRecord
>
{
/**
* Id
*/
@Parameter
(
description
=
"Id"
)
private
Long
id
;
/**
* Id IN值List
*/
@Parameter
(
description
=
"Id IN值List"
)
private
List
<
Long
>
idList
;
/**
* 优惠券Id
*/
@Parameter
(
description
=
"优惠券Id"
)
private
Long
couponId
;
/**
* 用户优惠券关系id
*/
@Parameter
(
description
=
"用户优惠券关系id"
)
private
Long
userCouponId
;
/**
* 优惠券名称
*/
@Parameter
(
description
=
"优惠券名称"
)
private
String
couponName
;
/**
* 优惠券类型
*/
@Parameter
(
description
=
"优惠券类型"
)
private
CouponTypeEnum
couponType
;
/**
* 优惠券类型 IN值List
*/
@Parameter
(
description
=
"优惠券类型 IN值List"
)
private
List
<
String
>
couponTypeList
;
/**
* 优惠金额/折扣
*/
@Parameter
(
description
=
"优惠金额/折扣"
)
private
java
.
math
.
BigDecimal
couponDiscount
;
/**
* 发放人员id
*/
@Parameter
(
description
=
"发放人员id"
)
private
Long
sendId
;
/**
* 接收人员id
*/
@Parameter
(
description
=
"接收人员id"
)
private
Long
userInfoId
;
/**
* 操作人Id
*/
@Parameter
(
description
=
"操作人Id"
)
private
Long
editorId
;
/**
* 操作人
*/
@Parameter
(
description
=
"操作人"
)
private
String
editorName
;
/**
* 创建时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"创建时间"
)
private
java
.
util
.
Date
createTime
;
/**
* 创建时间 下限值(大于等于)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"创建时间 下限值(大于等于)"
)
private
java
.
util
.
Date
createTimeFrom
;
/**
* 创建时间 上限值(小于)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"创建时间 上限值(小于)"
)
private
java
.
util
.
Date
createTimeTo
;
/**
* 更新时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"更新时间"
)
private
java
.
util
.
Date
updateTime
;
/**
* 更新时间 下限值(大于等于)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"更新时间 下限值(大于等于)"
)
private
java
.
util
.
Date
updateTimeFrom
;
/**
* 更新时间 上限值(小于)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"更新时间 上限值(小于)"
)
private
java
.
util
.
Date
updateTimeTo
;
/**
* 将查询参数转化为查询Wrapper
*/
@Override
public
QueryWrapper
<
CouponSendRecord
>
toQueryWrapper
()
{
return
this
.
toQueryWrapper
(
""
);
}
/**
* 将查询参数转化为查询Wrapper
*/
@Override
public
QueryWrapper
<
CouponSendRecord
>
toQueryWrapper
(
String
columnPrefix
)
{
QueryWrapper
<
CouponSendRecord
>
wrapper
=
Wrappers
.<
CouponSendRecord
>
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
.
getCouponId
()
!=
null
,
columnPrefix
+
"coupon_id"
,
this
.
getCouponId
());
wrapper
.
eq
(
this
.
getUserCouponId
()
!=
null
,
columnPrefix
+
"user_coupon_id"
,
this
.
getUserCouponId
());
if
(
this
.
getCouponName
()
!=
null
)
{
if
(
this
.
getCouponName
().
startsWith
(
"%"
)
&&
this
.
getCouponName
().
endsWith
(
"%"
))
{
wrapper
.
like
(
columnPrefix
+
"coupon_name"
,
this
.
getCouponName
().
substring
(
1
,
this
.
getCouponName
().
length
()
-
1
));
}
else
if
(
this
.
getCouponName
().
startsWith
(
"%"
)
&&
!
this
.
getCouponName
().
endsWith
(
"%"
))
{
wrapper
.
likeLeft
(
columnPrefix
+
"coupon_name"
,
this
.
getCouponName
().
substring
(
1
));
}
else
if
(
this
.
getCouponName
().
endsWith
(
"%"
))
{
wrapper
.
likeRight
(
columnPrefix
+
"coupon_name"
,
this
.
getCouponName
().
substring
(
0
,
this
.
getCouponName
().
length
()
-
1
));
}
else
{
wrapper
.
eq
(
columnPrefix
+
"coupon_name"
,
this
.
getCouponName
());
}
}
wrapper
.
eq
(
this
.
getCouponType
()
!=
null
,
columnPrefix
+
"coupon_type"
,
this
.
getCouponType
());
wrapper
.
in
(
this
.
getCouponTypeList
()
!=
null
&&
this
.
getCouponTypeList
().
size
()
>
0
,
columnPrefix
+
"coupon_type"
,
this
.
getCouponTypeList
());
wrapper
.
eq
(
this
.
getCouponDiscount
()
!=
null
,
columnPrefix
+
"coupon_discount"
,
this
.
getCouponDiscount
());
wrapper
.
eq
(
this
.
getSendId
()
!=
null
,
columnPrefix
+
"send_id"
,
this
.
getSendId
());
wrapper
.
eq
(
this
.
getUserInfoId
()
!=
null
,
columnPrefix
+
"user_info_id"
,
this
.
getUserInfoId
());
wrapper
.
eq
(
this
.
getEditorId
()
!=
null
,
columnPrefix
+
"editor_id"
,
this
.
getEditorId
());
if
(
this
.
getEditorName
()
!=
null
)
{
if
(
this
.
getEditorName
().
startsWith
(
"%"
)
&&
this
.
getEditorName
().
endsWith
(
"%"
))
{
wrapper
.
like
(
columnPrefix
+
"editor_name"
,
this
.
getEditorName
().
substring
(
1
,
this
.
getEditorName
().
length
()
-
1
));
}
else
if
(
this
.
getEditorName
().
startsWith
(
"%"
)
&&
!
this
.
getEditorName
().
endsWith
(
"%"
))
{
wrapper
.
likeLeft
(
columnPrefix
+
"editor_name"
,
this
.
getEditorName
().
substring
(
1
));
}
else
if
(
this
.
getEditorName
().
endsWith
(
"%"
))
{
wrapper
.
likeRight
(
columnPrefix
+
"editor_name"
,
this
.
getEditorName
().
substring
(
0
,
this
.
getEditorName
().
length
()
-
1
));
}
else
{
wrapper
.
eq
(
columnPrefix
+
"editor_name"
,
this
.
getEditorName
());
}
}
wrapper
.
eq
(
this
.
getCreateTime
()
!=
null
,
columnPrefix
+
"create_time"
,
this
.
getCreateTime
());
wrapper
.
ge
(
this
.
getCreateTimeFrom
()
!=
null
,
columnPrefix
+
"create_time"
,
this
.
getCreateTimeFrom
());
wrapper
.
lt
(
this
.
getCreateTimeTo
()
!=
null
,
columnPrefix
+
"create_time"
,
this
.
getCreateTimeTo
());
wrapper
.
eq
(
this
.
getUpdateTime
()
!=
null
,
columnPrefix
+
"update_time"
,
this
.
getUpdateTime
());
wrapper
.
ge
(
this
.
getUpdateTimeFrom
()
!=
null
,
columnPrefix
+
"update_time"
,
this
.
getUpdateTimeFrom
());
wrapper
.
lt
(
this
.
getUpdateTimeTo
()
!=
null
,
columnPrefix
+
"update_time"
,
this
.
getUpdateTimeTo
());
return
wrapper
;
}
}
src/main/java/com/xwd/hospital/server/rest/req/PatientInfoParam.java
浏览文件 @
df029c88
...
...
@@ -108,6 +108,16 @@ public class PatientInfoParam extends BaseParam<PatientInfo> {
*/
@Parameter
(
description
=
"监护人手机号码"
)
private
String
guardianPhoneNumber
;
/**
* 是否删除
*/
@Parameter
(
description
=
"是否删除"
)
private
YesNoEnum
deleteStatus
;
/**
* 是否删除 IN值List
*/
@Parameter
(
description
=
"是否删除 IN值List"
)
private
List
<
String
>
deleteStatusList
;
/**
* 操作人Id
*/
...
...
@@ -256,6 +266,8 @@ public class PatientInfoParam extends BaseParam<PatientInfo> {
wrapper
.
eq
(
columnPrefix
+
"guardian_phone_number"
,
this
.
getGuardianPhoneNumber
());
}
}
wrapper
.
eq
(
this
.
getDeleteStatus
()
!=
null
,
columnPrefix
+
"delete_status"
,
this
.
getDeleteStatus
());
wrapper
.
in
(
this
.
getDeleteStatusList
()
!=
null
&&
this
.
getDeleteStatusList
().
size
()
>
0
,
columnPrefix
+
"delete_status"
,
this
.
getDeleteStatusList
());
wrapper
.
eq
(
this
.
getEditorId
()
!=
null
,
columnPrefix
+
"editor_id"
,
this
.
getEditorId
());
if
(
this
.
getEditorName
()
!=
null
)
{
if
(
this
.
getEditorName
().
startsWith
(
"%"
)
&&
this
.
getEditorName
().
endsWith
(
"%"
))
{
...
...
src/main/java/com/xwd/hospital/server/rest/req/ReferralRecordParam.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:转诊记录
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
rest
.
req
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
io.swagger.v3.oas.annotations.Parameter
;
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.ReferralRecord
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Builder
(
builderMethodName
=
"newBuilder"
)
@NoArgsConstructor
@AllArgsConstructor
public
class
ReferralRecordParam
extends
BaseParam
<
ReferralRecord
>
{
/**
* Id
*/
@Parameter
(
description
=
"Id"
)
private
Long
id
;
/**
* Id IN值List
*/
@Parameter
(
description
=
"Id IN值List"
)
private
List
<
Long
>
idList
;
/**
* 用户Id
*/
@Parameter
(
description
=
"用户Id"
)
private
Long
userInfoId
;
/**
* 患者Id
*/
@Parameter
(
description
=
"患者Id"
)
private
Long
patientId
;
/**
* 转出医院Id
*/
@Parameter
(
description
=
"转出医院Id"
)
private
Long
outHospitalId
;
/**
* 转入医院Id
*/
@Parameter
(
description
=
"转入医院Id"
)
private
Long
inHospitalId
;
/**
* 审核状态
*/
@Parameter
(
description
=
"审核状态"
)
private
AuditStateEnum
auditState
;
/**
* 审核状态 IN值List
*/
@Parameter
(
description
=
"审核状态 IN值List"
)
private
List
<
String
>
auditStateList
;
/**
* 审核人Id
*/
@Parameter
(
description
=
"审核人Id"
)
private
Long
auditId
;
/**
* 操作人Id
*/
@Parameter
(
description
=
"操作人Id"
)
private
Long
editorId
;
/**
* 操作人
*/
@Parameter
(
description
=
"操作人"
)
private
String
editorName
;
/**
* 创建时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"创建时间"
)
private
java
.
util
.
Date
createTime
;
/**
* 创建时间 下限值(大于等于)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"创建时间 下限值(大于等于)"
)
private
java
.
util
.
Date
createTimeFrom
;
/**
* 创建时间 上限值(小于)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"创建时间 上限值(小于)"
)
private
java
.
util
.
Date
createTimeTo
;
/**
* 更新时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"更新时间"
)
private
java
.
util
.
Date
updateTime
;
/**
* 更新时间 下限值(大于等于)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"更新时间 下限值(大于等于)"
)
private
java
.
util
.
Date
updateTimeFrom
;
/**
* 更新时间 上限值(小于)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Parameter
(
description
=
"更新时间 上限值(小于)"
)
private
java
.
util
.
Date
updateTimeTo
;
/**
* 将查询参数转化为查询Wrapper
*/
@Override
public
QueryWrapper
<
ReferralRecord
>
toQueryWrapper
()
{
return
this
.
toQueryWrapper
(
""
);
}
/**
* 将查询参数转化为查询Wrapper
*/
@Override
public
QueryWrapper
<
ReferralRecord
>
toQueryWrapper
(
String
columnPrefix
)
{
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
.
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
());
wrapper
.
eq
(
this
.
getEditorId
()
!=
null
,
columnPrefix
+
"editor_id"
,
this
.
getEditorId
());
if
(
this
.
getEditorName
()
!=
null
)
{
if
(
this
.
getEditorName
().
startsWith
(
"%"
)
&&
this
.
getEditorName
().
endsWith
(
"%"
))
{
wrapper
.
like
(
columnPrefix
+
"editor_name"
,
this
.
getEditorName
().
substring
(
1
,
this
.
getEditorName
().
length
()
-
1
));
}
else
if
(
this
.
getEditorName
().
startsWith
(
"%"
)
&&
!
this
.
getEditorName
().
endsWith
(
"%"
))
{
wrapper
.
likeLeft
(
columnPrefix
+
"editor_name"
,
this
.
getEditorName
().
substring
(
1
));
}
else
if
(
this
.
getEditorName
().
endsWith
(
"%"
))
{
wrapper
.
likeRight
(
columnPrefix
+
"editor_name"
,
this
.
getEditorName
().
substring
(
0
,
this
.
getEditorName
().
length
()
-
1
));
}
else
{
wrapper
.
eq
(
columnPrefix
+
"editor_name"
,
this
.
getEditorName
());
}
}
wrapper
.
eq
(
this
.
getCreateTime
()
!=
null
,
columnPrefix
+
"create_time"
,
this
.
getCreateTime
());
wrapper
.
ge
(
this
.
getCreateTimeFrom
()
!=
null
,
columnPrefix
+
"create_time"
,
this
.
getCreateTimeFrom
());
wrapper
.
lt
(
this
.
getCreateTimeTo
()
!=
null
,
columnPrefix
+
"create_time"
,
this
.
getCreateTimeTo
());
wrapper
.
eq
(
this
.
getUpdateTime
()
!=
null
,
columnPrefix
+
"update_time"
,
this
.
getUpdateTime
());
wrapper
.
ge
(
this
.
getUpdateTimeFrom
()
!=
null
,
columnPrefix
+
"update_time"
,
this
.
getUpdateTimeFrom
());
wrapper
.
lt
(
this
.
getUpdateTimeTo
()
!=
null
,
columnPrefix
+
"update_time"
,
this
.
getUpdateTimeTo
());
return
wrapper
;
}
}
src/main/java/com/xwd/hospital/server/service/CouponSendRecordService.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:优惠券发放记录表
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
service
;
import
java.util.List
;
import
com.xwd.hospital.server.base.BaseService
;
import
com.xwd.hospital.server.domain.CouponSendRecord
;
import
com.xwd.hospital.server.rest.req.CouponSendRecordParam
;
public
interface
CouponSendRecordService
extends
BaseService
<
CouponSendRecord
>
{
}
src/main/java/com/xwd/hospital/server/service/DoctorInfoService.java
浏览文件 @
df029c88
...
...
@@ -9,10 +9,14 @@
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.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.rest.req.DoctorInfoParam
;
import
com.xwd.hospital.server.rest.req.DoctorSearchParam
;
...
...
@@ -21,5 +25,7 @@ public interface DoctorInfoService extends BaseService<DoctorInfo> {
List
<
DoctorDto
>
queryDoctorList
(
DoctorSearchParam
param
);
DoctorInfoDto
queryDoctorDetail
(
Long
doctorId
);
IPage
<
PatientInfoDto
>
queryMyPatient
(
Page
page
);
}
src/main/java/com/xwd/hospital/server/service/ReferralRecordService.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:转诊记录
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
service
;
import
java.util.List
;
import
com.xwd.hospital.server.base.BaseService
;
import
com.xwd.hospital.server.domain.ReferralRecord
;
import
com.xwd.hospital.server.rest.req.ReferralRecordParam
;
public
interface
ReferralRecordService
extends
BaseService
<
ReferralRecord
>
{
}
src/main/java/com/xwd/hospital/server/service/impl/CouponSendRecordServiceImpl.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:优惠券发放记录表
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
service
.
impl
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
jakarta.annotation.Resource
;
import
com.baomidou.mybatisplus.core.enums.SqlMethod
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.toolkit.SqlHelper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.xwd.hospital.server.service.CouponSendRecordService
;
import
com.xwd.hospital.server.repository.CouponSendRecordMapper
;
import
com.xwd.hospital.server.repository.base.CouponSendRecordBaseMapper
;
import
com.xwd.hospital.server.domain.CouponSendRecord
;
import
com.xwd.hospital.server.rest.req.CouponSendRecordParam
;
@Service
public
class
CouponSendRecordServiceImpl
extends
ServiceImpl
<
CouponSendRecordMapper
,
CouponSendRecord
>
implements
CouponSendRecordService
{
@Override
public
int
updateAllFieldsById
(
CouponSendRecord
entity
)
{
return
this
.
getBaseMapper
().
updateAllFieldsById
(
entity
);
}
/**
* 批量插入
*
* @param entityList ignore
* @param batchSize ignore
* @return ignore
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
saveBatch
(
Collection
<
CouponSendRecord
>
entityList
,
int
batchSize
)
{
String
sqlStatement
=
SqlHelper
.
getSqlStatement
(
CouponSendRecordBaseMapper
.
class
,
SqlMethod
.
INSERT_ONE
);
return
executeBatch
(
entityList
,
batchSize
,
(
sqlSession
,
entity
)
->
sqlSession
.
insert
(
sqlStatement
,
entity
));
}
}
src/main/java/com/xwd/hospital/server/service/impl/DoctorInfoServiceImpl.java
浏览文件 @
df029c88
...
...
@@ -15,10 +15,13 @@ import java.util.Collection;
import
cn.dev33.satoken.stp.StpUtil
;
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.enums.DepartmentLevelEnum
;
import
com.xwd.hospital.server.enums.YesNoEnum
;
import
com.xwd.hospital.server.rest.req.DoctorSearchParam
;
...
...
@@ -123,4 +126,14 @@ public class DoctorInfoServiceImpl extends ServiceImpl<DoctorInfoMapper, DoctorI
return
doctorInfoDto
;
}
@Override
public
IPage
<
PatientInfoDto
>
queryMyPatient
(
Page
page
)
{
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
());
}
}
src/main/java/com/xwd/hospital/server/service/impl/ReferralRecordServiceImpl.java
0 → 100644
浏览文件 @
df029c88
/**
* 项目:互联网医疗
* 模型分组:服务管理
* 模型名称:转诊记录
* @Author: xiongwei
* @Date: 2023-09-05 09:42:00
*/
package
com
.
xwd
.
hospital
.
server
.
service
.
impl
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
jakarta.annotation.Resource
;
import
com.baomidou.mybatisplus.core.enums.SqlMethod
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.toolkit.SqlHelper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.xwd.hospital.server.service.ReferralRecordService
;
import
com.xwd.hospital.server.repository.ReferralRecordMapper
;
import
com.xwd.hospital.server.repository.base.ReferralRecordBaseMapper
;
import
com.xwd.hospital.server.domain.ReferralRecord
;
import
com.xwd.hospital.server.rest.req.ReferralRecordParam
;
@Service
public
class
ReferralRecordServiceImpl
extends
ServiceImpl
<
ReferralRecordMapper
,
ReferralRecord
>
implements
ReferralRecordService
{
@Override
public
int
updateAllFieldsById
(
ReferralRecord
entity
)
{
return
this
.
getBaseMapper
().
updateAllFieldsById
(
entity
);
}
/**
* 批量插入
*
* @param entityList ignore
* @param batchSize ignore
* @return ignore
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
saveBatch
(
Collection
<
ReferralRecord
>
entityList
,
int
batchSize
)
{
String
sqlStatement
=
SqlHelper
.
getSqlStatement
(
ReferralRecordBaseMapper
.
class
,
SqlMethod
.
INSERT_ONE
);
return
executeBatch
(
entityList
,
batchSize
,
(
sqlSession
,
entity
)
->
sqlSession
.
insert
(
sqlStatement
,
entity
));
}
}
src/main/resources/application-dev.yml
浏览文件 @
df029c88
...
...
@@ -21,8 +21,8 @@ knife4j:
wx
:
miniapp
:
configs
:
-
appid
:
wx
c447fccb6a2745ce
secret
:
af277a664613a2276266eca024bff139
-
appid
:
wx
508b7d59b1a20314
secret
:
2c40b1f087e1508403250366fdf1a79c
token
:
#微信小程序消息服务器配置的token
aesKey
:
#微信小程序消息服务器配置的EncodingAESKey
msgDataFormat
:
JSON
...
...
src/main/resources/application-prod.yml
浏览文件 @
df029c88
...
...
@@ -21,8 +21,8 @@ knife4j:
wx
:
miniapp
:
configs
:
-
appid
:
wx
c447fccb6a2745ce
secret
:
af277a664613a2276266eca024bff139
-
appid
:
wx
508b7d59b1a20314
secret
:
2c40b1f087e1508403250366fdf1a79c
token
:
#微信小程序消息服务器配置的token
aesKey
:
#微信小程序消息服务器配置的EncodingAESKey
msgDataFormat
:
JSON
...
...
src/main/resources/db/migration/V1.0.0__schema.sql
浏览文件 @
df029c88
...
...
@@ -93,6 +93,7 @@ create table `pms_disease_config`
id
int
(
11
)
auto_increment
not
null
comment
'Id'
,
disease_name
varchar
(
255
)
not
null
comment
'疾病名称'
,
disease_desc
varchar
(
255
)
not
null
comment
'疾病描述'
,
common_symptoms
varchar
(
255
)
not
null
comment
'常见症状'
,
editor_id
int
(
11
)
not
null
default
1
comment
'操作人Id'
,
editor_name
varchar
(
255
)
not
null
default
'admin'
comment
'操作人'
,
create_time
datetime
not
null
default
CURRENT_TIMESTAMP
comment
'创建时间'
,
...
...
@@ -166,6 +167,23 @@ create table `pms_invite_register_record`
primary
key
(
`id`
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_general_ci
comment
=
'邀请信息记录表'
;
drop
table
if
exists
`pms_referral_record`
;
create
table
`pms_referral_record`
(
id
int
(
11
)
auto_increment
not
null
comment
'Id'
,
user_info_id
int
(
11
)
not
null
comment
'用户Id'
,
patient_id
int
(
11
)
not
null
comment
'患者Id'
,
out_hospital_id
int
(
11
)
not
null
comment
'转出医院Id'
,
in_hospital_id
int
(
11
)
not
null
comment
'转入医院Id'
,
audit_state
varchar
(
50
)
not
null
default
'TO_AUDIT'
comment
'审核状态 [TO_AUDIT.待审核 AUDIT_SUCCESS.审核通过 AUDIT_FAIL.审核失败]'
,
audit_id
int
(
11
)
null
comment
'审核人Id'
,
editor_id
int
(
11
)
not
null
default
1
comment
'操作人Id'
,
editor_name
varchar
(
255
)
not
null
default
'admin'
comment
'操作人'
,
create_time
datetime
not
null
default
CURRENT_TIMESTAMP
comment
'创建时间'
,
update_time
datetime
not
null
default
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
comment
'更新时间'
,
primary
key
(
`id`
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_general_ci
comment
=
'转诊记录'
;
drop
table
if
exists
`pms_doctor_service_info`
;
create
table
`pms_doctor_service_info`
(
...
...
@@ -199,6 +217,7 @@ create table `pms_patient_info`
guardian_name
varchar
(
255
)
null
comment
'就诊人姓名'
,
guardian_identification_number
varchar
(
255
)
null
comment
'监护人身份证号码'
,
guardian_phone_number
varchar
(
255
)
null
comment
'监护人手机号码'
,
delete_status
varchar
(
50
)
not
null
default
'NO'
comment
'是否删除 [YES.是 NO.否]'
,
editor_id
int
(
11
)
not
null
default
1
comment
'操作人Id'
,
editor_name
varchar
(
255
)
not
null
default
'admin'
comment
'操作人'
,
create_time
datetime
not
null
default
CURRENT_TIMESTAMP
comment
'创建时间'
,
...
...
src/main/resources/mappers/CouponSendRecordMapper.xml
0 → 100644
浏览文件 @
df029c88
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.xwd.hospital.server.repository.CouponSendRecordMapper"
>
<resultMap
id=
"ResultMap"
type=
"com.xwd.hospital.server.domain.CouponSendRecord"
extends=
"com.xwd.hospital.server.repository.base.CouponSendRecordBaseMapper.ResultMap"
>
</resultMap>
<resultMap
id=
"ListResultMap"
type=
"com.xwd.hospital.server.domain.CouponSendRecord"
extends=
"com.xwd.hospital.server.repository.base.CouponSendRecordBaseMapper.BaseResultMap"
>
</resultMap>
<!-- 根据主键查询 -->
<select
id=
"selectById"
parameterType=
"java.io.Serializable"
resultMap=
"ResultMap"
>
select
<include
refid=
"com.xwd.hospital.server.repository.base.CouponSendRecordBaseMapper.Base_Column_List"
/>
from pms_coupon_send_record
where id = #{id}
</select>
<!-- 根据Wrapper查询 -->
<select
id=
"selectOne"
resultMap=
"ResultMap"
>
select
<include
refid=
"com.xwd.hospital.server.repository.base.CouponSendRecordBaseMapper.Base_Column_List"
/>
from pms_coupon_send_record
${ew.customSqlSegment}
LIMIT 1
</select>
<!-- 根据Wrapper查询 -->
<select
id=
"selectPage"
resultMap=
"ListResultMap"
>
select
<include
refid=
"com.xwd.hospital.server.repository.base.CouponSendRecordBaseMapper.Base_Column_List"
/>
from pms_coupon_send_record
${ew.customSqlSegment}
</select>
<!-- 根据Wrapper查询 -->
<select
id=
"selectList"
resultMap=
"ResultMap"
>
select
<include
refid=
"com.xwd.hospital.server.repository.base.CouponSendRecordBaseMapper.Base_Column_List"
/>
from pms_coupon_send_record
${ew.customSqlSegment}
</select>
</mapper>
src/main/resources/mappers/DoctorInfoMapper.xml
浏览文件 @
df029c88
...
...
@@ -116,4 +116,13 @@
left join pms_disease_config pdc on pdc.id= crd.disease_id
where crd.doctor_id = #{doctorId}
</select>
<select
id=
"queryMyPatient"
resultType=
"com.xwd.hospital.server.dto.PatientInfoDto"
>
SELECT
p.id as patientId,p.patient_name,p.sex,p.born_date as bornDate
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'
GROUP BY p.id
</select>
</mapper>
src/main/resources/mappers/ReferralRecordMapper.xml
0 → 100644
浏览文件 @
df029c88
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.xwd.hospital.server.repository.ReferralRecordMapper"
>
<resultMap
id=
"ResultMap"
type=
"com.xwd.hospital.server.domain.ReferralRecord"
extends=
"com.xwd.hospital.server.repository.base.ReferralRecordBaseMapper.ResultMap"
>
</resultMap>
<resultMap
id=
"ListResultMap"
type=
"com.xwd.hospital.server.domain.ReferralRecord"
extends=
"com.xwd.hospital.server.repository.base.ReferralRecordBaseMapper.BaseResultMap"
>
</resultMap>
<!-- 根据主键查询 -->
<select
id=
"selectById"
parameterType=
"java.io.Serializable"
resultMap=
"ResultMap"
>
select
<include
refid=
"com.xwd.hospital.server.repository.base.ReferralRecordBaseMapper.Base_Column_List"
/>
from pms_referral_record
where id = #{id}
</select>
<!-- 根据Wrapper查询 -->
<select
id=
"selectOne"
resultMap=
"ResultMap"
>
select
<include
refid=
"com.xwd.hospital.server.repository.base.ReferralRecordBaseMapper.Base_Column_List"
/>
from pms_referral_record
${ew.customSqlSegment}
LIMIT 1
</select>
<!-- 根据Wrapper查询 -->
<select
id=
"selectPage"
resultMap=
"ListResultMap"
>
select
<include
refid=
"com.xwd.hospital.server.repository.base.ReferralRecordBaseMapper.Base_Column_List"
/>
from pms_referral_record
${ew.customSqlSegment}
</select>
<!-- 根据Wrapper查询 -->
<select
id=
"selectList"
resultMap=
"ResultMap"
>
select
<include
refid=
"com.xwd.hospital.server.repository.base.ReferralRecordBaseMapper.Base_Column_List"
/>
from pms_referral_record
${ew.customSqlSegment}
</select>
</mapper>
src/main/resources/mappers/base/CouponSendRecordBaseMapper.xml
0 → 100644
浏览文件 @
df029c88
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.xwd.hospital.server.repository.base.CouponSendRecordBaseMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.xwd.hospital.server.domain.CouponSendRecord"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"coupon_id"
jdbcType=
"BIGINT"
property=
"couponId"
/>
<result
column=
"user_coupon_id"
jdbcType=
"BIGINT"
property=
"userCouponId"
/>
<result
column=
"coupon_name"
jdbcType=
"VARCHAR"
property=
"couponName"
/>
<result
column=
"coupon_type"
jdbcType=
"VARCHAR"
property=
"couponType"
/>
<result
column=
"coupon_discount"
jdbcType=
"DECIMAL"
property=
"couponDiscount"
/>
<result
column=
"send_id"
jdbcType=
"BIGINT"
property=
"sendId"
/>
<result
column=
"user_info_id"
jdbcType=
"BIGINT"
property=
"userInfoId"
/>
<result
column=
"editor_id"
jdbcType=
"BIGINT"
property=
"editorId"
/>
<result
column=
"editor_name"
jdbcType=
"VARCHAR"
property=
"editorName"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<resultMap
id=
"ResultMap"
type=
"com.xwd.hospital.server.domain.CouponSendRecord"
extends=
"BaseResultMap"
>
<association
column=
"coupon_id"
property=
"coupon"
javaType=
"com.xwd.hospital.server.domain.CouponInfo"
select=
"com.xwd.hospital.server.repository.CouponInfoMapper.selectById"
/>
<association
column=
"user_coupon_id"
property=
"userCoupon"
javaType=
"com.xwd.hospital.server.domain.UserCouponInfo"
select=
"com.xwd.hospital.server.repository.UserCouponInfoMapper.selectById"
/>
<association
column=
"send_id"
property=
"send"
javaType=
"com.xwd.hospital.server.domain.User"
select=
"com.xwd.hospital.server.repository.UserMapper.selectById"
/>
<association
column=
"user_info_id"
property=
"userInfo"
javaType=
"com.xwd.hospital.server.domain.UserInfo"
select=
"com.xwd.hospital.server.repository.UserInfoMapper.selectById"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
`id`, `coupon_id`, `user_coupon_id`, `coupon_name`, `coupon_type`, `coupon_discount`, `send_id`, `user_info_id`, `editor_id`, `editor_name`, `create_time`, `update_time`
</sql>
<sql
id=
"Base_Column_List_With_Prefix"
>
t.`id`, t.`coupon_id`, t.`user_coupon_id`, t.`coupon_name`, t.`coupon_type`, t.`coupon_discount`, t.`send_id`, t.`user_info_id`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
</sql>
<insert
id=
"batchInsert"
>
insert into pms_coupon_send_record (
`coupon_id`, `user_coupon_id`, `coupon_name`, `coupon_type`, `coupon_discount`, `send_id`, `user_info_id`, `editor_id`, `editor_name`
)
values
<foreach
collection=
"records"
item=
"record"
separator=
","
>
(
#{record.couponId, jdbcType=BIGINT}, #{record.userCouponId, jdbcType=BIGINT}, #{record.couponName, jdbcType=VARCHAR}, #{record.couponType, jdbcType=VARCHAR}, #{record.couponDiscount, jdbcType=DECIMAL}, #{record.sendId, jdbcType=BIGINT}, #{record.userInfoId, jdbcType=BIGINT}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
)
</foreach>
</insert>
<update
id=
"updateAllFieldsById"
parameterType=
"com.xwd.hospital.server.domain.CouponSendRecord"
>
update pms_coupon_send_record set
<trim
suffixOverrides=
","
>
coupon_id = #{et.couponId, jdbcType=BIGINT},
user_coupon_id = #{et.userCouponId, jdbcType=BIGINT},
coupon_name = #{et.couponName, jdbcType=VARCHAR},
coupon_type = #{et.couponType, jdbcType=VARCHAR},
coupon_discount = #{et.couponDiscount, jdbcType=DECIMAL},
send_id = #{et.sendId, jdbcType=BIGINT},
user_info_id = #{et.userInfoId, jdbcType=BIGINT},
editor_id = #{et.editorId, jdbcType=BIGINT},
editor_name = #{et.editorName, jdbcType=VARCHAR},
</trim>
where id = #{et.id}
</update>
</mapper>
src/main/resources/mappers/base/PatientInfoBaseMapper.xml
浏览文件 @
df029c88
...
...
@@ -14,6 +14,7 @@
<result
column=
"guardian_name"
jdbcType=
"VARCHAR"
property=
"guardianName"
/>
<result
column=
"guardian_identification_number"
jdbcType=
"VARCHAR"
property=
"guardianIdentificationNumber"
/>
<result
column=
"guardian_phone_number"
jdbcType=
"VARCHAR"
property=
"guardianPhoneNumber"
/>
<result
column=
"delete_status"
jdbcType=
"VARCHAR"
property=
"deleteStatus"
/>
<result
column=
"editor_id"
jdbcType=
"BIGINT"
property=
"editorId"
/>
<result
column=
"editor_name"
jdbcType=
"VARCHAR"
property=
"editorName"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
...
...
@@ -24,19 +25,19 @@
select=
"com.xwd.hospital.server.repository.UserInfoMapper.selectById"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
`id`, `user_info_id`, `relation`, `patient_name`, `sex`, `id_no`, `phone_number`, `born_date`, `guardian_state`, `guardian_name`, `guardian_identification_number`, `guardian_phone_number`, `editor_id`, `editor_name`, `create_time`, `update_time`
`id`, `user_info_id`, `relation`, `patient_name`, `sex`, `id_no`, `phone_number`, `born_date`, `guardian_state`, `guardian_name`, `guardian_identification_number`, `guardian_phone_number`, `
delete_status`, `
editor_id`, `editor_name`, `create_time`, `update_time`
</sql>
<sql
id=
"Base_Column_List_With_Prefix"
>
t.`id`, t.`user_info_id`, t.`relation`, t.`patient_name`, t.`sex`, t.`id_no`, t.`phone_number`, t.`born_date`, t.`guardian_state`, t.`guardian_name`, t.`guardian_identification_number`, t.`guardian_phone_number`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
t.`id`, t.`user_info_id`, t.`relation`, t.`patient_name`, t.`sex`, t.`id_no`, t.`phone_number`, t.`born_date`, t.`guardian_state`, t.`guardian_name`, t.`guardian_identification_number`, t.`guardian_phone_number`, t.`
delete_status`, t.`
editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
</sql>
<insert
id=
"batchInsert"
>
insert into pms_patient_info (
`user_info_id`, `relation`, `patient_name`, `sex`, `id_no`, `phone_number`, `born_date`, `guardian_state`, `guardian_name`, `guardian_identification_number`, `guardian_phone_number`, `editor_id`, `editor_name`
`user_info_id`, `relation`, `patient_name`, `sex`, `id_no`, `phone_number`, `born_date`, `guardian_state`, `guardian_name`, `guardian_identification_number`, `guardian_phone_number`, `
delete_status`, `
editor_id`, `editor_name`
)
values
<foreach
collection=
"records"
item=
"record"
separator=
","
>
(
#{record.userInfoId, jdbcType=BIGINT}, #{record.relation, jdbcType=VARCHAR}, #{record.patientName, jdbcType=VARCHAR}, #{record.sex, jdbcType=VARCHAR}, #{record.idNo, jdbcType=VARCHAR}, #{record.phoneNumber, jdbcType=VARCHAR}, #{record.bornDate, jdbcType=VARCHAR}, #{record.guardianState, jdbcType=VARCHAR}, #{record.guardianName, jdbcType=VARCHAR}, #{record.guardianIdentificationNumber, jdbcType=VARCHAR}, #{record.guardianPhoneNumber, jdbcType=VARCHAR}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
#{record.userInfoId, jdbcType=BIGINT}, #{record.relation, jdbcType=VARCHAR}, #{record.patientName, jdbcType=VARCHAR}, #{record.sex, jdbcType=VARCHAR}, #{record.idNo, jdbcType=VARCHAR}, #{record.phoneNumber, jdbcType=VARCHAR}, #{record.bornDate, jdbcType=VARCHAR}, #{record.guardianState, jdbcType=VARCHAR}, #{record.guardianName, jdbcType=VARCHAR}, #{record.guardianIdentificationNumber, jdbcType=VARCHAR}, #{record.guardianPhoneNumber, jdbcType=VARCHAR}, #{record.
deleteStatus, jdbcType=VARCHAR}, #{record.
editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
)
</foreach>
</insert>
...
...
@@ -54,6 +55,7 @@
guardian_name = #{et.guardianName, jdbcType=VARCHAR},
guardian_identification_number = #{et.guardianIdentificationNumber, jdbcType=VARCHAR},
guardian_phone_number = #{et.guardianPhoneNumber, jdbcType=VARCHAR},
delete_status = #{et.deleteStatus, jdbcType=VARCHAR},
editor_id = #{et.editorId, jdbcType=BIGINT},
editor_name = #{et.editorName, jdbcType=VARCHAR},
</trim>
...
...
src/main/resources/mappers/base/ReferralRecordBaseMapper.xml
0 → 100644
浏览文件 @
df029c88
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<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=
"audit_state"
jdbcType=
"VARCHAR"
property=
"auditState"
/>
<result
column=
"audit_id"
jdbcType=
"BIGINT"
property=
"auditId"
/>
<result
column=
"editor_id"
jdbcType=
"BIGINT"
property=
"editorId"
/>
<result
column=
"editor_name"
jdbcType=
"VARCHAR"
property=
"editorName"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<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"
/>
<association
column=
"out_hospital_id"
property=
"outHospital"
javaType=
"com.xwd.hospital.server.domain.HospitalInfo"
select=
"com.xwd.hospital.server.repository.HospitalInfoMapper.selectById"
/>
<association
column=
"in_hospital_id"
property=
"inHospital"
javaType=
"com.xwd.hospital.server.domain.HospitalInfo"
select=
"com.xwd.hospital.server.repository.HospitalInfoMapper.selectById"
/>
<association
column=
"audit_id"
property=
"audit"
javaType=
"com.xwd.hospital.server.domain.User"
select=
"com.xwd.hospital.server.repository.UserMapper.selectById"
/>
</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`
</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`
</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`
)
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}
)
</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},
audit_state = #{et.auditState, jdbcType=VARCHAR},
audit_id = #{et.auditId, jdbcType=BIGINT},
editor_id = #{et.editorId, jdbcType=BIGINT},
editor_name = #{et.editorName, jdbcType=VARCHAR},
</trim>
where id = #{et.id}
</update>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论