RestaurantWeeklyRecipeMarge

package
v5.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//RecipeType 菜谱类型
	// 用于区分职工菜谱等内容
	RecipeType = ClassSort.Sort{
		SortTableName: "restaurant_weekly_recipe_type",
	}
	//RecipeUnit 菜品单位
	RecipeUnit = ClassSort.Sort{
		SortTableName: "restaurant_weekly_recipe_unit",
	}
)

Functions

func AuditWeeklyRecipe

func AuditWeeklyRecipe(args *ArgsAuditWeeklyRecipe) (err error)

AuditWeeklyRecipe 审核每周菜谱上报

func CreateWeeklyRecipe

func CreateWeeklyRecipe(args *ArgsCreateWeeklyRecipe) (id int64, err error)

CreateWeeklyRecipe 创建周数据

func CreateWeeklyRecipeMarge added in v5.1.39

func CreateWeeklyRecipeMarge(args *ArgsCreateWeeklyRecipeMarge) (weeklyRecipeID int64, err error)

CreateWeeklyRecipeMarge 聚合创建数据

func DeleteWeeklyRecipe

func DeleteWeeklyRecipe(args *ArgsDeleteWeeklyRecipe) (err error)

DeleteWeeklyRecipe 删除周数据

func DeleteWeeklyRecipeRaw added in v5.1.39

func DeleteWeeklyRecipeRaw(id int64) (err error)

DeleteWeeklyRecipeRaw 删除指定周菜谱的原材料

func GetWeeklyRecipeNameByID

func GetWeeklyRecipeNameByID(id int64) (name string)

GetWeeklyRecipeNameByID 获取周数据名称

func Init

func Init() (err error)

Init 初始化

func PrintExcelRaw added in v5.1.39

func PrintExcelRaw(c any, logErr string, args *ArgsPrintExcelRaw)

PrintExcelRaw 导出周菜谱原材料

func SetWeeklyRecipeRaw added in v5.1.39

func SetWeeklyRecipeRaw(args *ArgsSetWeeklyRecipeRaw) (err error)

func UpdateWeeklyRecipe

func UpdateWeeklyRecipe(args *ArgsUpdateWeeklyRecipe) (err error)

UpdateWeeklyRecipe 修改周数据

func UpdateWeeklyRecipeMarge added in v5.1.39

func UpdateWeeklyRecipeMarge(args *ArgsUpdateWeeklyRecipeMarge) (err error)

UpdateWeeklyRecipeMarge 聚合修改数据

func UpdateWeeklyRecipeRaw added in v5.1.39

func UpdateWeeklyRecipeRaw(args *ArgsUpdateWeeklyRecipeRaw) (err error)

更新指定周菜谱的原材料

Types

type ArgsAuditWeeklyRecipe

type ArgsAuditWeeklyRecipe struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//当前组织ID
	// 用于验证数据是否属于当前组织
	RawOrgID int64 `db:"raw_org_id" json:"rawOrgID" check:"id" empty:"true"`
	//审核状态
	//0 草稿; 1 未审核; 2 审核通过; 3 审核不通过 ; 4 审核未通过,重新提交
	AuditStatus int `db:"audit_status" json:"auditStatus" check:"intThan0" empty:"true"`
	//审核人ID
	AuditOrgBindID int64 `db:"audit_org_bind_id" json:"auditOrgBindID" check:"id" empty:"true"`
	//审核用户ID
	// 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID
	AuditUserID int64 `db:"audit_user_id" json:"auditUserID" check:"id" empty:"true"`
	//审核人姓名
	AuditUserName string `db:"audit_user_name" json:"auditUserName" check:"des" min:"1" max:"300" empty:"true"`
	//审核备注
	AuditRemark string `db:"audit_remark" json:"auditRemark" check:"des" min:"1" max:"1000" default:"empty" empty:"true"`
}

ArgsAuditWeeklyRecipe 审核每周菜谱上报参数

type ArgsCreateWeeklyRecipe

type ArgsCreateWeeklyRecipe struct {
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id"`
	//提交组织成员ID
	SubmitOrgBindID int64 `db:"submit_org_bind_id" json:"submitOrgBindID" check:"id" empty:"true"`
	//提交用户ID
	// 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID
	SubmitUserID int64 `db:"submit_user_id" json:"submitUserID" check:"id" empty:"true"`
	//提交人姓名
	SubmitUserName string `db:"submit_user_name" json:"submitUserName" check:"des" min:"1" max:"300" empty:"true"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"`
	//备注
	Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" index:"true"`
}

ArgsCreateWeeklyRecipe 创建周数据参数

type ArgsCreateWeeklyRecipeMarge added in v5.1.39

type ArgsCreateWeeklyRecipeMarge struct {
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id"`
	//提交组织成员ID
	SubmitOrgBindID int64 `db:"submit_org_bind_id" json:"submitOrgBindID" check:"id" empty:"true"`
	//提交用户ID
	// 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID
	SubmitUserID int64 `db:"submit_user_id" json:"submitUserID" check:"id" empty:"true"`
	//提交人姓名
	SubmitUserName string `db:"submit_user_name" json:"submitUserName" check:"des" min:"1" max:"300" empty:"true"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"`
	//备注
	Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" index:"true"`
	//日数据
	DayList []DataGetWeeklyRecipeMargeDay `json:"dayList"`
}

ArgsCreateWeeklyRecipeMarge 聚合创建数据参数

type ArgsDeleteWeeklyRecipe

type ArgsDeleteWeeklyRecipe struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true"`
}

ArgsDeleteWeeklyRecipe 删除周数据参数

type ArgsGetRawAnalysis added in v5.1.39

type ArgsGetRawAnalysis struct {
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true" index:"true"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true" index:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" empty:"true" index:"true"`
	//时间范围
	BetweenAt CoreSQL2.ArgsTimeBetween `json:"betweenAt"`
}

ArgsGetRawAnalysis 周分化单统计数据参数

type ArgsGetWeeklyRecipeByID

type ArgsGetWeeklyRecipeByID struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true"`
}

ArgsGetWeeklyRecipeByID 获取周数据参数

type ArgsGetWeeklyRecipeChild added in v5.1.39

type ArgsGetWeeklyRecipeChild struct {
	//每周菜谱ID
	WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id" index:"true"`
	//每日菜谱ID
	WeeklyRecipeDayID int64 `db:"weekly_recipe_day_id" json:"weeklyRecipeDayID" check:"id" index:"true"`
	//每日类型
	// 1:早餐; 2:中餐; 3:晚餐
	DayType int `db:"day_type" json:"dayType" check:"intThan0" empty:"true" index:"true"`
}

ArgsGetWeeklyRecipeChild 获取日明细数据参数

type ArgsGetWeeklyRecipeDay added in v5.1.39

type ArgsGetWeeklyRecipeDay struct {
	//每周菜谱ID
	WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id" index:"true"`
}

ArgsGetWeeklyRecipeDay 获取日数据参数

type ArgsGetWeeklyRecipeList

type ArgsGetWeeklyRecipeList struct {
	//分页参数
	Pages CoreSQL2.ArgsPages `json:"pages"`
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//分公司ID组
	OrgIDs []int64 `db:"org_ids" json:"orgIDs" check:"ids" empty:"true"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true"`
	//门店ID列
	StoreIDs []int64 `db:"store_ids" json:"storeIDs" check:"ids" empty:"true"`
	//提交组织成员ID
	SubmitOrgBindID int64 `db:"submit_org_bind_id" json:"submitOrgBindID" check:"id" empty:"true"`
	//提交用户ID
	// 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID
	SubmitUserID int64 `db:"submit_user_id" json:"submitUserID" check:"id" empty:"true"`
	//审核状态
	// 0 未审核; 1 审核通过; 2 审核不通过
	AuditStatus int `db:"audit_status" json:"auditStatus" check:"intThan0" empty:"true"`
	//审核人ID
	AuditOrgBindID int64 `db:"audit_org_bind_id" json:"auditOrgBindID" check:"id" empty:"true"`
	//审核用户ID
	// 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID
	AuditUserID int64 `db:"audit_user_id" json:"auditUserID" check:"id" empty:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" index:"true"`
	//是否删除
	IsRemove bool `json:"isRemove" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetWeeklyRecipeList 获取周数据列表参数

type ArgsGetWeeklyRecipeRaw added in v5.1.39

type ArgsGetWeeklyRecipeRaw struct {
	//每周菜谱ID
	WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id" empty:"true" index:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" empty:"true" index:"true"`
	// 用餐日期
	// 例如:20210101
	DiningDate int `db:"dining_date" json:"diningDate" empty:"true" index:"true"`
	//每日类型
	// 1:早餐; 2:中餐; 3:晚餐
	DayType int `db:"day_type" json:"dayType" check:"intThan0" empty:"true" index:"true"`
	//菜品ID
	RecipeID int64 `db:"recipe_id" json:"recipeID" check:"id" empty:"true" index:"true"`
}

type ArgsGetWeeklyRecipeRawByChildID added in v5.1.39

type ArgsGetWeeklyRecipeRawByChildID struct {
	//周菜品关联行ID
	RecipeChildID int64 `db:"recipe_child_id" json:"recipeChildID" check:"id" index:"true"`
}

ArgsGetWeeklyRecipeRawByChildID 获取指定周菜谱的原材料参数

type ArgsPrintExcelRaw added in v5.1.39

type ArgsPrintExcelRaw struct {
	//每周菜谱ID
	WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id" index:"true"`
}

type ArgsSetWeeklyRecipeRaw added in v5.1.39

type ArgsSetWeeklyRecipeRaw struct {
	//周菜品关联行ID
	RecipeChildID int64 `db:"recipe_child_id" json:"recipeChildID" check:"id" index:"true"`
	//原材料组成
	RawList []ArgsSetWeeklyRecipeRawItem `db:"raw_list" json:"rawList"`
}

type ArgsSetWeeklyRecipeRawItem added in v5.1.39

type ArgsSetWeeklyRecipeRawItem struct {
	//原材料ID
	MaterialID int64 `db:"material_id" json:"materialID" check:"id" empty:"true" index:"true"`
	//用量
	UseCount float64 `db:"use_count" json:"useCount" check:"intThan0"`
	//单价
	Price float64 `db:"price" json:"price" check:"intThan0" empty:"true"`
	//总价
	TotalPrice float64 `db:"total_price" json:"totalPrice" check:"intThan0" empty:"true"`
}

type ArgsUpdateWeeklyRecipe

type ArgsUpdateWeeklyRecipe struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"`
	//备注
	Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" index:"true"`
}

ArgsUpdateWeeklyRecipe 修改周数据参数

type ArgsUpdateWeeklyRecipeMarge added in v5.1.39

type ArgsUpdateWeeklyRecipeMarge struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"`
	//备注
	Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" index:"true"`
	//日数据
	DayList []DataGetWeeklyRecipeMargeDay `json:"dayList"`
}

ArgsUpdateWeeklyRecipeMarge 聚合修改数据参数

type ArgsUpdateWeeklyRecipeRaw added in v5.1.39

type ArgsUpdateWeeklyRecipeRaw struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//用量
	UseCount float64 `db:"use_count" json:"useCount" check:"intThan0"`
	//单价
	Price float64 `db:"price" json:"price" check:"intThan0" empty:"true"`
	//总价
	TotalPrice float64 `db:"total_price" json:"totalPrice" check:"intThan0" empty:"true"`
}

更新指定周菜谱的原材料参数

type DataGetRawAnalysis added in v5.1.39

type DataGetRawAnalysis struct {
	//原材料ID
	MaterialID int64 `db:"material_id" json:"materialID" check:"id" empty:"true" index:"true"`
	//原材料名称
	MaterialName string `db:"material_name" json:"materialName" check:"des" min:"1" max:"300" empty:"true"`
	//用量
	UseCount float64 `db:"use_count" json:"useCount" check:"intThan0"`
	//使用次数
	CountUse int `db:"count_use" json:"countUse" check:"intThan0"`
	//单价均价
	PriceAvg float64 `db:"price_avg" json:"priceAvg"`
	//合计总价
	PriceTotal float64 `db:"price_total" json:"priceTotal"`
}

DataGetRawAnalysis 周分化单统计数据

func GetRawAnalysis added in v5.1.39

func GetRawAnalysis(args *ArgsGetRawAnalysis) (dataList []DataGetRawAnalysis, err error)

GetRawAnalysis 周分化单统计数据

type DataGetWeeklyRecipeMargeDay added in v5.1.39

type DataGetWeeklyRecipeMargeDay struct {
	// 用餐日期
	// 例如:20210101
	DiningDate int `db:"dining_date" json:"diningDate" index:"true"`
	//早餐
	Breakfast []DataGetWeeklyRecipeMargeDayItem `json:"breakfast"`
	//午餐
	Lunch []DataGetWeeklyRecipeMargeDayItem `json:"lunch"`
	//晚餐
	Dinner []DataGetWeeklyRecipeMargeDayItem `json:"dinner"`
}

func GetWeeklyRecipeBeforeMarge added in v5.1.39

func GetWeeklyRecipeBeforeMarge(weeklyRecipeID int64) (dayList []DataGetWeeklyRecipeMargeDay, err error)

func SetWeeklyRecipeDay added in v5.1.39

func SetWeeklyRecipeDay(weeklyRecipeID int64, newData []DataGetWeeklyRecipeMargeDay) (dataList []DataGetWeeklyRecipeMargeDay, err error)

SetWeeklyRecipeDay 创建日数据

type DataGetWeeklyRecipeMargeDayItem added in v5.1.39

type DataGetWeeklyRecipeMargeDayItem struct {
	//唯一ID
	ID int64 `db:"id" json:"id"`
	//菜品ID
	RecipeID int64 `db:"recipe_id" json:"recipeID" check:"id" index:"true"`
	//菜品名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"`
	//售价
	Price int64 `db:"price" json:"price" check:"int64Than0" empty:"true"`
	//数量
	RecipeCount int `db:"recipe_count" json:"recipeCount" check:"intThan0" empty:"true"`
	//单位
	Unit string `db:"unit" json:"unit" check:"des" min:"1" max:"300" empty:"true"`
	//单位ID
	UnitID int64 `db:"unit_id" json:"unitID" index:"true" check:"id" empty:"true"`
	//上周同时间段是否出现过
	IsRepeat bool `db:"is_repeat" json:"isRepeat" default:"false"`
	//上周早中晚是否全部出现过
	IsRepeatDay bool `db:"is_repeat_day" json:"isRepeatDay" default:"false"`
	//上周任意一天出现过
	IsRepeatAll bool `db:"is_repeat_all" json:"isRepeatAll" default:"false"`
}

func SetWeeklyRecipeChild added in v5.1.39

func SetWeeklyRecipeChild(weeklyRecipeID int64, weeklyRecipeDayID int64, dayType int, newData []DataGetWeeklyRecipeMargeDayItem) (dataList []DataGetWeeklyRecipeMargeDayItem, err error)

SetWeeklyRecipeChild 修改日明细数据

type DataWeeklyRecipeMarge added in v5.1.39

type DataWeeklyRecipeMarge struct {
	// ID
	ID int64 `db:"id" json:"id" check:"id" unique:"true"`
	//创建时间
	CreateAt string `db:"create_at" json:"createAt" default:"now()"`
	//更新时间
	UpdateAt string `db:"update_at" json:"updateAt" default:"now()"`
	//删除时间
	DeleteAt string `db:"delete_at" json:"deleteAt" default:"0"`
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" index:"true"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id" index:"true"`
	//提交组织成员ID
	SubmitOrgBindID int64 `db:"submit_org_bind_id" json:"submitOrgBindID" check:"id" empty:"true" index:"true"`
	//提交用户ID
	// 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID
	SubmitUserID int64 `db:"submit_user_id" json:"submitUserID" check:"id" empty:"true" index:"true"`
	//提交人姓名
	SubmitUserName string `db:"submit_user_name" json:"submitUserName" check:"des" min:"1" max:"300" empty:"true"`
	//审核时间
	AuditAt string `db:"audit_at" json:"auditAt" index:"true"`
	//审核状态
	// 0 未审核; 1 审核通过; 2 审核不通过
	AuditStatus int `db:"audit_status" json:"auditStatus" check:"intThan0" empty:"true" index:"true"`
	//审核人ID
	AuditOrgBindID int64 `db:"audit_org_bind_id" json:"auditOrgBindID" check:"id" empty:"true" index:"true"`
	//审核用户ID
	// 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID
	AuditUserID int64 `db:"audit_user_id" json:"auditUserID" check:"id" empty:"true" index:"true"`
	//审核人姓名
	AuditUserName string `db:"audit_user_name" json:"auditUserName" check:"des" min:"1" max:"300" empty:"true"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"`
	//备注
	Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" index:"true"`
	//菜谱类型名称
	RecipeTypeName string `db:"recipe_type_name" json:"recipeTypeName" check:"des" min:"1" max:"300" empty:"true"`
	//日数据
	DayList []DataGetWeeklyRecipeMargeDay `json:"dayList"`
	//上周日数据
	BeforeDayList []DataGetWeeklyRecipeMargeDay `json:"beforeDayList"`
}

DataWeeklyRecipeMarge 聚合数据包

func GetWeeklyRecipeMarge added in v5.1.39

func GetWeeklyRecipeMarge(weeklyRecipeID int64) (data DataWeeklyRecipeMarge, err error)

GetWeeklyRecipeMarge 获取周菜谱聚合数据 * 1. 底层存储改为分表结构 2. 对外输出采用rawData结构

type FieldsWeeklyRecipe

type FieldsWeeklyRecipe struct {
	// ID
	ID int64 `db:"id" json:"id" check:"id" unique:"true"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt" default:"now()"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt" default:"now()"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt" default:"0"`
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" index:"true"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id" index:"true"`
	//提交组织成员ID
	SubmitOrgBindID int64 `db:"submit_org_bind_id" json:"submitOrgBindID" check:"id" empty:"true" index:"true"`
	//提交用户ID
	// 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID
	SubmitUserID int64 `db:"submit_user_id" json:"submitUserID" check:"id" empty:"true" index:"true"`
	//提交人姓名
	SubmitUserName string `db:"submit_user_name" json:"submitUserName" check:"des" min:"1" max:"300" empty:"true"`
	//审核时间
	AuditAt time.Time `db:"audit_at" json:"auditAt" index:"true"`
	//审核状态
	//0 草稿; 1 未审核; 2 审核通过; 3 审核不通过 ; 4 审核未通过,重新提交
	AuditStatus int `db:"audit_status" json:"auditStatus" check:"intThan0" empty:"true" index:"true"`
	//审核备注
	AuditRemark string `db:"audit_remark" json:"auditRemark" check:"des" min:"1" max:"1000" default:"empty" empty:"true"`
	//审核人ID
	AuditOrgBindID int64 `db:"audit_org_bind_id" json:"auditOrgBindID" check:"id" empty:"true" index:"true"`
	//审核用户ID
	// 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID
	AuditUserID int64 `db:"audit_user_id" json:"auditUserID" check:"id" empty:"true" index:"true"`
	//审核人姓名
	AuditUserName string `db:"audit_user_name" json:"auditUserName" check:"des" min:"1" max:"300" empty:"true"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"`
	//备注
	Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" index:"true"`
	//菜谱类型名称
	RecipeTypeName string `db:"recipe_type_name" json:"recipeTypeName" check:"des" min:"1" max:"300" empty:"true"`
}

FieldsWeeklyRecipe 每周提交菜谱表头

func GetWeeklyRecipeByID

func GetWeeklyRecipeByID(args *ArgsGetWeeklyRecipeByID) (data FieldsWeeklyRecipe, err error)

GetWeeklyRecipeByID 获取周数据

func GetWeeklyRecipeList

func GetWeeklyRecipeList(args *ArgsGetWeeklyRecipeList) (dataList []FieldsWeeklyRecipe, dataCount int64, err error)

GetWeeklyRecipeList 获取周数据列表

type FieldsWeeklyRecipeChild added in v5.1.39

type FieldsWeeklyRecipeChild struct {
	// ID
	ID int64 `db:"id" json:"id" check:"id" unique:"true"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt" default:"now()"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt" default:"now()"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt" default:"0"`
	//每周菜谱ID
	WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id" index:"true"`
	//每日菜谱ID
	WeeklyRecipeDayID int64 `db:"weekly_recipe_day_id" json:"weeklyRecipeDayID" check:"id" index:"true"`
	//每日类型
	// 1:早餐; 2:中餐; 3:晚餐
	DayType int `db:"day_type" json:"dayType" check:"intThan0" empty:"true" index:"true"`
	//菜品ID
	RecipeID int64 `db:"recipe_id" json:"recipeID" check:"id" index:"true"`
	//菜品名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"`
	//售价
	Price int64 `db:"price" json:"price" check:"int64Than0" empty:"true"`
	//数量
	RecipeCount int `db:"recipe_count" json:"recipeCount" check:"intThan0" empty:"true"`
	//单位
	Unit string `db:"unit" json:"unit" check:"des" min:"1" max:"300" empty:"true"`
	//单位ID
	UnitID int64 `db:"unit_id" json:"unitID" index:"true" check:"id" empty:"true"`
}

FieldsWeeklyRecipeChild 每周提交菜谱每日明细

func GetWeeklyRecipeChild added in v5.1.39

func GetWeeklyRecipeChild(args *ArgsGetWeeklyRecipeChild) (dataList []FieldsWeeklyRecipeChild, err error)

GetWeeklyRecipeChild 获取日明细数据

type FieldsWeeklyRecipeDay added in v5.1.39

type FieldsWeeklyRecipeDay struct {
	// ID
	ID int64 `db:"id" json:"id" check:"id" unique:"true"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt" default:"now()"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt" default:"now()"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt" default:"0"`
	//每周菜谱ID
	WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id" index:"true"`
	// 用餐日期
	// 例如:20210101
	DiningDate int `db:"dining_date" json:"diningDate" index:"true"`
}

FieldsWeeklyRecipeDay 每周提交菜谱每日信息

func GetWeeklyRecipeDay added in v5.1.39

func GetWeeklyRecipeDay(args *ArgsGetWeeklyRecipeDay) (dataList []FieldsWeeklyRecipeDay, err error)

GetWeeklyRecipeDay 获取日数据

type FieldsWeeklyRecipeRaw added in v5.1.39

type FieldsWeeklyRecipeRaw struct {
	// ID
	ID int64 `db:"id" json:"id" check:"id" unique:"true"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt" default:"now()"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt" default:"now()"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt" default:"0"`
	//分公司ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true" index:"true"`
	//门店ID
	StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true" index:"true"`
	//每周菜谱ID
	WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id" index:"true"`
	//菜谱类型ID
	RecipeTypeID int64 `db:"recipe_type_id" json:"recipeTypeID" check:"id" index:"true"`
	//菜谱类型名称
	RecipeTypeName string `db:"recipe_type_name" json:"recipeTypeName" check:"des" min:"1" max:"300" empty:"true"`
	// 用餐日期
	// 例如:20210101
	DiningDate int `db:"dining_date" json:"diningDate" index:"true"`
	//每日类型
	// 1:早餐; 2:中餐; 3:晚餐
	DayType int `db:"day_type" json:"dayType" check:"intThan0" empty:"true" index:"true"`
	//菜品ID
	RecipeID int64 `db:"recipe_id" json:"recipeID" check:"id" index:"true"`
	//菜品名称
	RecipeName string `db:"recipe_name" json:"recipeName"`
	//周菜品关联行ID
	RecipeChildID int64 `db:"recipe_child_id" json:"recipeChildID" check:"id" empty:"true" index:"true"`
	//原材料ID
	MaterialID int64 `db:"material_id" json:"materialID" check:"id" empty:"true" index:"true"`
	//原材料名称
	MaterialName string `db:"material_name" json:"materialName" check:"des" min:"1" max:"300" empty:"true"`
	//用量
	UseCount float64 `db:"use_count" json:"useCount" check:"intThan0"`
	//单价
	Price float64 `db:"price" json:"price" check:"intThan0" empty:"true" default:"0"`
	//总价
	TotalPrice float64 `db:"total_price" json:"totalPrice" check:"intThan0" empty:"true" default:"0"`
}

FieldsWeeklyRecipeRaw 每周菜谱绑定的原材料

func GetWeeklyRecipeRaw added in v5.1.39

func GetWeeklyRecipeRaw(args *ArgsGetWeeklyRecipeRaw) (dataList []FieldsWeeklyRecipeRaw, err error)

GetWeeklyRecipeRaw 获取指定周菜谱的原材料

func GetWeeklyRecipeRawByChildID added in v5.1.39

func GetWeeklyRecipeRawByChildID(args *ArgsGetWeeklyRecipeRawByChildID) (dataList []FieldsWeeklyRecipeRaw, err error)

GetWeeklyRecipeRawByChildID 获取指定周菜谱的原材料

func GetWeeklyRecipeRawData added in v5.1.39

func GetWeeklyRecipeRawData(id int64) (data FieldsWeeklyRecipeRaw)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL