修正 获取服务包当月已问诊次数1
This commit is contained in:
parent
1bbdcd6ae6
commit
ece26a2a17
@ -2,6 +2,7 @@ package service
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"hospital-admin-api/api/dao"
|
||||
"hospital-admin-api/api/dto"
|
||||
"hospital-admin-api/api/model"
|
||||
@ -118,6 +119,7 @@ func (r *OrderServicePackageService) GetOrderServicePackageDetailInfo(orderServi
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println(g.MonthInquiryCount)
|
||||
// 获取服务包当月剩余问诊次数
|
||||
g.RemainingInquiryCount = r.GetRemainingInquiryCount(orderServicePackageDetail.MonthlyFrequency, g.MonthInquiryCount)
|
||||
}
|
||||
@ -530,16 +532,16 @@ func (r *OrderServicePackageService) getOrderServicePackageCurrentMonthDate(star
|
||||
|
||||
// 检测问诊是否服务包首次问诊
|
||||
func (r *OrderServicePackageService) isFirstInquiryServicePackage(orderNo string) (bool, error) {
|
||||
orderServicePackageDao := dao.OrderServicePackageDao{}
|
||||
orderServicePackageInquiryDao := dao.OrderServicePackageInquiryDao{}
|
||||
|
||||
maps := make(map[string]interface{})
|
||||
maps["order_service_no"] = orderNo
|
||||
orderServicePackage, err := orderServicePackageDao.GetOrderServicePackageList(maps)
|
||||
orderServicePackageInquiry, err := orderServicePackageInquiryDao.GetOrderServicePackageInquiryList(maps)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if len(orderServicePackage) == 1 {
|
||||
if len(orderServicePackageInquiry) == 1 {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user