修正 获取服务包当月已问诊次数1

This commit is contained in:
wucongxing8150 2024-06-14 15:35:37 +08:00
parent 1bbdcd6ae6
commit ece26a2a17

View File

@ -2,6 +2,7 @@ package service
import ( import (
"errors" "errors"
"fmt"
"hospital-admin-api/api/dao" "hospital-admin-api/api/dao"
"hospital-admin-api/api/dto" "hospital-admin-api/api/dto"
"hospital-admin-api/api/model" "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) 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) { func (r *OrderServicePackageService) isFirstInquiryServicePackage(orderNo string) (bool, error) {
orderServicePackageDao := dao.OrderServicePackageDao{} orderServicePackageInquiryDao := dao.OrderServicePackageInquiryDao{}
maps := make(map[string]interface{}) maps := make(map[string]interface{})
maps["order_service_no"] = orderNo maps["order_service_no"] = orderNo
orderServicePackage, err := orderServicePackageDao.GetOrderServicePackageList(maps) orderServicePackageInquiry, err := orderServicePackageInquiryDao.GetOrderServicePackageInquiryList(maps)
if err != nil { if err != nil {
return false, err return false, err
} }
if len(orderServicePackage) == 1 { if len(orderServicePackageInquiry) == 1 {
return true, nil return true, nil
} }