package function_api_controllers

import (
	"XT_Admin_Api/controllers"
	"fmt"
	"XT_Admin_Api/service"
	"XT_Admin_Api/enums"
	"time"
	"XT_Admin_Api/utils"
)

type FunctionBaseAPIController struct {
	controllers.BaseAPIController
}

func (this *FunctionBaseAPIController)GetTodayInfo(){
	//adminUserInfo := this.GetAdminUserInfo()
	//userOrgID := adminUserInfo.CurrentOrgId
	//fmt.Println("机构id", userOrgID)
	range_data := this.GetString("range_data")
	fmt.Println("range_data是设么",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
    fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	//unix := time.Now().Unix()
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("total是什么",total)
	fmt.Println("查询错误是什么",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})

	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
	})
}

func  (this *FunctionBaseAPIController) GetYestodayInfo()  {
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	range_data := this.GetString("range_data")
	fmt.Println("昨日日期",range_data)
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayInfo(rangeTimeStamp, now,page,limit)
	fmt.Println("total",total)
	fmt.Println("patients是什么",patients)
	fmt.Println("查询错误是什么",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})

}

func (this *FunctionBaseAPIController) GetWeekInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("一周日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	//patients, err := service.GetWeekInfo()
	//if err !=nil{
	//	this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
	//	return
	//}
	//this.ServeSuccessJSON(map[string]interface{}{
	//	"patients":patients,
	//})
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayInfo(rangeTimeStamp, now,page,limit)
	fmt.Println(total)
	fmt.Println("patients是什么",patients)
	fmt.Println("查询错误是什么",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetMonthInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("一月日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayInfo(rangeTimeStamp, now,page,limit)
	fmt.Println(total)
	fmt.Println("patients是什么",patients)
	fmt.Println("查询错误是什么",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetThreeMonthInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("一月日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayInfo(rangeTimeStamp, now,page,limit)
	fmt.Println(total)
	fmt.Println("patients是什么",patients)
	fmt.Println("查询错误是什么",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetHalfYearInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("一月日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayInfo(rangeTimeStamp, now,page,limit)
	fmt.Println(total)
	fmt.Println("patients是什么",patients)
	fmt.Println("查询错误是什么",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYearInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("一月日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayInfo(rangeTimeStamp, now,page,limit)
	fmt.Println(total)
	fmt.Println("patients是什么",patients)
	fmt.Println("查询错误是什么",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetTodayDialysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("今天透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}

	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	dialysis, total, err := service.GetTodayDialysisPatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("dialysis",dialysis)
	fmt.Println("total",total)
	fmt.Println("报错",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"dialysis":dialysis,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetYesterTodayDialysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("昨日透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}

	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	dialysis, total, err := service.GetTodayDialysisPatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("dialysis",dialysis)
	fmt.Println("total",total)
	fmt.Println("报错",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"dialysis":dialysis,
		"total":total,
	})
}

func (this *FunctionBaseAPIController)  GetWeekDialysisinfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本周透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	dialysis, total, err := service.GetTodayDialysisPatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("dialysis",dialysis)
	fmt.Println("total",total)
	fmt.Println("报错",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"dialysis":dialysis,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetMonthDailysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	dialysis, total, err := service.GetTodayDialysisPatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("dialysis",dialysis)
	fmt.Println("total",total)
	fmt.Println("报错",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"dialysis":dialysis,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetThreeMonthDailysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	dialysis, total, err := service.GetTodayDialysisPatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("dialysis",dialysis)
	fmt.Println("total",total)
	fmt.Println("报错",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"dialysis":dialysis,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetHalfYearDailysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	dialysis, total, err := service.GetTodayDialysisPatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("dialysis",dialysis)
	fmt.Println("total",total)
	fmt.Println("报错",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"dialysis":dialysis,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYearDailysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	dialysis, total, err := service.GetTodayDialysisPatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("dialysis",dialysis)
	fmt.Println("total",total)
	fmt.Println("报错",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"dialysis":dialysis,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetReceiveinfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})

}

func (this *FunctionBaseAPIController) GetYesTodayReceiveinfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetWeekReceiveinfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetMonthReceiveinfo()  {
	range_data := this.GetString("range_data")
		fmt.Println("本月透析处方日期",range_data)
		page, _ := this.GetInt64("page", 1)
		fmt.Println("页面",page)
		limit, _ := this.GetInt64("limit", 10)
		fmt.Println("limit",limit)
		if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetThreeMonthReceiveinfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetHalfYearReceiveinfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYearReceiveinfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetTodayBeforDislysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	//receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	receive, total, err := service.GetTodayBeforDislysisInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYesterTodayBeforDislysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController)  GetMonthBeforDislysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetWeekBeforDislysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetThreeMonthBeforDislysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetHalfYearBeforDislysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController)  GetYearBeforDislysisInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController)  GetTodayDoctorsOrderInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoctorsOrderInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYesterDayDoctorsOrderInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoctorsOrderInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetWeekDoctorOrder()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoctorsOrderInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetMonthDoctorOrder()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoctorsOrderInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetThreeMonthDoctorOrder()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoctorsOrderInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetHalfYearDoctorOrder()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoctorsOrderInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYearDoctorOrder()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoctorsOrderInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetTodayDoubleCheckInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoubleCheckInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYesTodayDoubleCheckInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoubleCheckInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetWeekDoubleCheckInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoubleCheckInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController)  GetMonthDoubleCheckInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoubleCheckInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController)  GetThreeMonthDoubleCheckInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoubleCheckInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetHalfYearDoubleCheckInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoubleCheckInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYearDoubleCheckInfo()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	receive, total, err := service.GetTodayDoubleCheckInfo(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",receive)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"receive":receive,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetTodayDialysisMachinek()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisMachinek(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYesterTodayDialysisMachinek()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisMachinek(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetWeekDialsysImachaine()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisMachinek(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetMonthDialsysImachaine()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisMachinek(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetThreeMonthDialsysImachaine()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisMachinek(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetHalfYearDialysisMachine()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisMachinek(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYearDialysisMachine()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisMachinek(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetTodayDialysisExamination()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisExamination(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetYesTodayDialysisExamination()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisExamination(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetWeekDialysisExamination()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisExamination(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetMonthDialysisExamination()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisExamination(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetThreeMonthDialysisExamination()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisExamination(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GethalfyearDialysisExamination()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisExamination(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYearDialysisExamination()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayDialysisExamination(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetTodayBeforOrpenetration()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayBeforOrpenetration(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYesterDayBeforpinetration()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayBeforOrpenetration(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetWeekBeforPenetration()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayBeforOrpenetration(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetMonthBeforPenetration()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayBeforOrpenetration(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetThreeMonthBeforPenetration()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayBeforOrpenetration(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetHalfYearBeforPenetration()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayBeforOrpenetration(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYearBeforPenetration()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayBeforOrpenetration(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetTodayPostAssessment()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayPostAssessment(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYesterDayPostAssessment()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayPostAssessment(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetWeekPostAssessment()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayPostAssessment(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetMonthPostAssessment()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayPostAssessment(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetThreeMonthAssessment()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayPostAssessment(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetHalfYearPostAssessment()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayPostAssessment(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetYearPostAssessment()  {
	range_data := this.GetString("range_data")
	fmt.Println("本月透析处方日期",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	patients, total, err := service.GetTodayPostAssessment(rangeTimeStamp, now, page, limit)
	fmt.Println("patients",patients)
	fmt.Println("total",total)
	fmt.Println("错误",err)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"patients":patients,
		"total":total,
	})
}

func (this *FunctionBaseAPIController) GetTodayEntrylist()  {
	range_data := this.GetString("range_data")
	fmt.Println("本日出库单",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	userorg, total, err := service.GetTodayEntrylist(rangeTimeStamp, now, limit, page)
	//3代表血透,2//退出登录状态
	//userorgs, err := service.GetTodayLogout(0, 2)
	//fmt.Scan("userorgs是什么",userorgs)
	fmt.Println("userorg是什么",userorg)
	fmt.Println("err",err)
	fmt.Println("total是什么",total)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"userorg":userorg,
		"total":total,
	})
}

func  (this *FunctionBaseAPIController) GetYesterdayEntrylist()  {
	range_data := this.GetString("range_data")
	fmt.Println("本日出库单",range_data)
	page, _ := this.GetInt64("page", 1)
	fmt.Println("页面",page)
	limit, _ := this.GetInt64("limit", 10)
	fmt.Println("limit",limit)
	if page <= 0 {
		page = 1
	}
	if limit <= 0 {
		limit = 10
	}
	var rangeDate *time.Time
	var parseDateErr error
	var rangeTimeStamp int64

	if len(range_data) > 0 {
		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
		if parseDateErr != nil {
			this.ErrorLog("日期(%v)解析错误：%v", range_data, parseDateErr)
			return
		}
		rangeTimeStamp = rangeDate.Unix()
	} else {
		rangeTimeStamp = 0
	}
	now := time.Now().Unix()
	userorg, total, err := service.GetTodayEntrylist(rangeTimeStamp, now, limit, page)
	//3代表血透,2//退出登录状态
	//userorgs, err := service.GetTodayLogout(0, 2)
	//fmt.Scan("userorgs是什么",userorgs)
	fmt.Println("userorg是什么",userorg)
	fmt.Println("err",err)
	fmt.Println("total是什么",total)
	if err !=nil{
		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
		return
	}
	this.ServeSuccessJSON(map[string]interface{}{
		"userorg":userorg,
		"total":total,
	})
}