智慧食堂
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

md_enterprise.go 7.1 KiB

1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
3 meses atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. package md
  2. import (
  3. "applet/app/db/model"
  4. "applet/app/enum"
  5. )
  6. type EnterpriseAddReq struct {
  7. Name string `json:"name" binding:"required" label:"名称"`
  8. Pvd int32 `json:"pvd" label:"消费场景"`
  9. Mode int32 `json:"mode" label:"模式(1:学校 2:工厂 3:养老院)"`
  10. Kind int32 `json:"kind" binding:"required" label:"种类(1:央厨-学校 2:央厨-工厂 3:自营-学校 4:自营-工厂 5:养老院)"`
  11. CompanyId int `json:"company_id" binding:"required" label:"所属公司id"`
  12. Memo string `json:"memo" label:"备注"`
  13. }
  14. type CentralKitchenForSchoolUpdateReq struct {
  15. Id int `json:"id" binding:"required" label:"企业id"`
  16. Name string `json:"name" binding:"required" label:"名称"`
  17. CompanyId int `json:"company_id" binding:"required" label:"所属公司id"`
  18. Memo string `json:"memo" label:"备注"`
  19. State int32 `json:"state" label:"状态"`
  20. PeriodList []struct {
  21. Id int `json:"id" label:"学段id"`
  22. Name string `json:"name" label:"名称"`
  23. GradeList []struct {
  24. Id int `json:"id" label:"年级id"`
  25. Name string `json:"name" label:"名称"`
  26. ClassList []struct {
  27. Id int `json:"id" label:"班级id"`
  28. Name string `json:"name" label:"名称"`
  29. } `json:"class_list" label:"班级"`
  30. } `json:"grade_list" label:"年级"`
  31. } `json:"period_list" label:"学段"`
  32. }
  33. type EnterpriseDeleteReq struct {
  34. EnterpriseIds []int `json:"enterprise_ids"`
  35. }
  36. type EnterpriseUpdateStateReq struct {
  37. Id int `json:"id" binding:"required" label:"企业id"`
  38. State int32 `json:"state" label:"状态"`
  39. }
  40. type EnterpriseListReq struct {
  41. Limit int `json:"limit"`
  42. Page int `json:"page" `
  43. Name string `json:"name" label:"名称"`
  44. Kind int `json:"kind" label:"种类"`
  45. Pvd int `json:"pvd" label:"场景"`
  46. Mode int `json:"mode" label:"模式"`
  47. State int32 `json:"state" label:"状态"`
  48. }
  49. type EnterpriseDetailResp struct {
  50. Enterprise model.Enterprise `json:"enterprise"`
  51. PeriodList []PeriodListStruct `json:"period_list"`
  52. }
  53. type PeriodListStruct struct {
  54. Period model.Period `json:"period"`
  55. GradeList []GradeListStruct `json:"grade_list"`
  56. }
  57. type GradeListStruct struct {
  58. Grade model.Grade `json:"grade"`
  59. ClassList []model.Class `json:"class_list"`
  60. }
  61. type SetCentralKitchenForSchoolWithSpecForSystemReq struct {
  62. BreakfastUnitPrice string `json:"breakfast_unit_price" binding:"required" label:"早餐-单价"`
  63. BreakfastUnitPriceForTeacher string `json:"breakfast_unit_price_for_teacher" binding:"required" label:"教师-早餐-单价"`
  64. LunchUnitPrice string `json:"lunch_unit_price" binding:"required" label:"午餐-单价"`
  65. LunchUnitPriceForTeacher string `json:"lunch_unit_price_for_teacher" binding:"required" label:"教师-午餐-单价"`
  66. DinnerUnitPrice string `json:"dinner_unit_price" binding:"required" label:"晚餐-单价"`
  67. DinnerUnitPriceForTeacher string `json:"dinner_unit_price_for_teacher" binding:"required" label:"教师-晚餐-单价"`
  68. }
  69. type ListCentralKitchenForSchoolPackageForSystemReq struct {
  70. Page int `json:"page" label:"页码"`
  71. Limit int `json:"limit" label:"每页数量"`
  72. Year string `json:"year" label:"年份"`
  73. Month string `json:"month" label:"月份"`
  74. }
  75. type SaveCentralKitchenForSchoolPackageForSystemReq struct {
  76. Id int `json:"id" label:"套餐ID"`
  77. Year string `json:"year" binding:"required" label:"年份"`
  78. Month string `json:"month" binding:"required" label:"月份"`
  79. StartDate string `json:"start_date" binding:"required" label:"开始时间"`
  80. EndDate string `json:"end_date" binding:"required" label:"截止时间"`
  81. State int `json:"state" label:"状态(1:可用 2:不可用)"`
  82. DateList []struct {
  83. Date string `json:"date"`
  84. IsOpenBreakfast int `json:"is_open_breakfast"`
  85. IsOpenLunch int `json:"is_open_lunch"`
  86. IsOpenDinner int `json:"is_open_dinner"`
  87. IsOpenReplenish int `json:"is_open_replenish"`
  88. } `json:"date_list" binding:"required" label:"日期"`
  89. }
  90. type SyncCentralKitchenForSchoolPackageForSystemReq struct {
  91. Ids []int `json:"ids" label:"套餐ids"`
  92. EnterpriseIds []int `json:"enterprise_ids" label:"校企ids"`
  93. IsCarryPackagePrice bool `json:"is_carry_package_price" label:"是否跟随套餐价格"`
  94. }
  95. type CentralKitchenForSchoolPackageForSystemWithDay struct {
  96. Date string `json:"date"`
  97. IsOpenBreakfast int `json:"is_open_breakfast"`
  98. IsOpenLunch int `json:"is_open_lunch"`
  99. IsOpenDinner int `json:"is_open_dinner"`
  100. IsOpenReplenish int `json:"is_open_replenish"`
  101. }
  102. type CentralKitchenForSchoolStudentAdmissionBySchool struct {
  103. EnterpriseIds []int `json:"enterprise_ids" binding:"required" label:"企业id"`
  104. }
  105. type CentralKitchenForSchoolStudentAdmissionByGrade struct {
  106. EnterpriseId int `json:"enterprise_id" binding:"required" label:"企业id"`
  107. GradeIds []int `json:"grade_ids" binding:"required" label:"年级id"`
  108. }
  109. type CentralKitchenForSchoolStudentAdmissionByClass struct {
  110. EnterpriseId int `json:"enterprise_id" binding:"required" label:"企业id"`
  111. GradeId int `json:"grade_id" binding:"required" label:"年级id"`
  112. ClassIds []int `json:"class_ids" label:"班级id"`
  113. }
  114. var EnterpriseKindByMode = []map[string]interface{}{
  115. {
  116. "name": enum.EnterpriseMode(enum.EnterpriseModeForSchool).String(),
  117. "value": enum.EnterpriseModeForSchool,
  118. "kind_list": []map[string]interface{}{
  119. {
  120. "name": enum.EnterpriseKind(enum.EnterpriseKindByCentralKitchenForSchool).String(),
  121. "value": enum.EnterpriseKindByCentralKitchenForSchool,
  122. },
  123. {
  124. "name": enum.EnterpriseKind(enum.EnterpriseKindBySelfSupportForSchool).String(),
  125. "value": enum.EnterpriseKindBySelfSupportForSchool,
  126. },
  127. },
  128. },
  129. {
  130. "name": enum.EnterpriseMode(enum.EnterpriseModeForFactory).String(),
  131. "value": enum.EnterpriseModeForFactory,
  132. "kind_list": []map[string]interface{}{
  133. {
  134. "name": enum.EnterpriseKind(enum.EnterpriseKindByCentralKitchenForFactory).String(),
  135. "value": enum.EnterpriseKindByCentralKitchenForFactory,
  136. },
  137. {
  138. "name": enum.EnterpriseKind(enum.EnterpriseKindBySelfSupportForFactory).String(),
  139. "value": enum.EnterpriseKindBySelfSupportForFactory,
  140. },
  141. },
  142. },
  143. {
  144. "name": enum.EnterpriseMode(enum.EnterpriseModeForNursingHome).String(),
  145. "value": enum.EnterpriseModeForNursingHome,
  146. "kind_list": []map[string]interface{}{
  147. {
  148. "name": enum.EnterpriseKind(enum.EnterpriseKindByNursingHome).String(),
  149. "value": enum.EnterpriseKindByNursingHome,
  150. },
  151. },
  152. },
  153. }
  154. var EnterpriseKindForSchool = []map[string]interface{}{
  155. {
  156. "name": enum.EnterpriseKind.String(enum.EnterpriseKindByCentralKitchenForSchool),
  157. "value": enum.EnterpriseKindByCentralKitchenForSchool,
  158. },
  159. {
  160. "name": enum.EnterpriseKind.String(enum.EnterpriseKindBySelfSupportForSchool),
  161. "value": enum.EnterpriseKindBySelfSupportForSchool,
  162. },
  163. }
  164. var CentralKitchenWxTransferOrdForState = []map[string]interface{}{
  165. {
  166. "name": "已受理",
  167. "value": 1,
  168. },
  169. {
  170. "name": "转账中",
  171. "value": 2,
  172. },
  173. {
  174. "name": "已完成",
  175. "value": 3,
  176. },
  177. {
  178. "name": "已关闭",
  179. "value": 4,
  180. },
  181. }