This commit is contained in:
wucongxing 2023-11-03 17:07:41 +08:00
parent a559492f8e
commit 265ae82fb6
3 changed files with 6 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import (
"hospital-admin-api/api/service"
"hospital-admin-api/global"
"hospital-admin-api/utils"
"math"
"strconv"
)
@ -293,9 +294,12 @@ func (r *OrderInquiry) GetOrderInquiryForAccountPage(c *gin.Context) {
if v.InquiryStatus == 4 || v.InquiryStatus == 5 {
entryStatus := 2
v.EntryStatus = &entryStatus
v.DoctorAmount = math.Floor(v.AmountTotal*0.75*100000) / 100000 // 医生收益
}
if v.InquiryStatus == 6 {
v.DoctorAmount = math.Floor(v.AmountTotal*0.75*100000) / 100000 // 医生收益
if v.StatisticsStatus == 1 {
entryStatus := 1
v.EntryStatus = &entryStatus

View File

@ -206,7 +206,7 @@ func (r *DoctorWithdrawalOrderDto) LoadInquiryStatus(m *model.OrderInquiry) *Doc
// LoadDoctorAmount 加载医生收益
func (r *DoctorWithdrawalOrderDto) LoadDoctorAmount(m *model.OrderInquiry) *DoctorWithdrawalOrderDto {
if m != nil {
r.DoctorAmount = math.Floor(m.AmountTotal*0.75*100) / 100
r.DoctorAmount = math.Floor(m.AmountTotal*0.75*100000) / 100000
}
return r
}

View File

@ -50,6 +50,7 @@ type OrderInquiryDto struct {
UserDoctor *UserDoctorDto `json:"user_doctor"` // 医生数据
MessageIm []*MessageImDto `json:"message_im"` // 聊天记录
EntryStatus *int `json:"entry_status"` // 入账状态0:未入账 1:已入账 2:入账中 3:入账失败)
DoctorAmount float64 `json:"doctor_amount"` // 医生收益
}
// GetOrderInquiryDto 问诊订单详情