calendar.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. package backend
  2. import (
  3. "context"
  4. "fmt"
  5. "kpt-pasture/model"
  6. "kpt-pasture/util"
  7. "net/http"
  8. "time"
  9. pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow"
  10. "gitee.com/xuyiping_admin/pkg/xerr"
  11. )
  12. // CalendarToDoList 获取日历待办列表
  13. func (s *StoreEntry) CalendarToDoList(ctx context.Context, req *pasturePb.CalendarToDoRequest, pagination *pasturePb.PaginationModel) (*pasturePb.CalendarToDoResponse, error) {
  14. userModel, err := s.GetUserModel(ctx)
  15. if err != nil {
  16. return nil, xerr.WithStack(err)
  17. }
  18. var count int64 = 0
  19. eventItem := make([]*model.EventItem, 0)
  20. pref := s.DB.Model(&model.EventItem{})
  21. if req.StartAt > 0 && req.EndAt > 0 && req.StartAt <= req.EndAt {
  22. pref = pref.Where("plan_day >= ?", req.StartAt).
  23. Where("plan_day <= ?", req.EndAt)
  24. }
  25. if len(req.CowIds) > 0 {
  26. cowList, _ := s.ParseCowIds(ctx, userModel.AppPasture.Id, req.CowIds)
  27. cowIds := make([]int64, 0)
  28. for _, cow := range cowList {
  29. cowIds = append(cowIds, cow.Id)
  30. }
  31. if len(cowIds) > 0 {
  32. pref.Where("cow_id IN (?)", cowIds)
  33. }
  34. }
  35. if req.CalendarType > 0 {
  36. pref.Where("calendar_type = ?", req.CalendarType)
  37. }
  38. if req.IsFinish > 0 {
  39. pref.Where("is_finish = ?", req.IsFinish)
  40. }
  41. if req.IsExpire > 0 {
  42. pref.Where("is_expire = ?", req.IsExpire)
  43. }
  44. if err = pref.Order("id desc").
  45. Count(&count).
  46. Limit(int(pagination.PageSize)).
  47. Offset(int(pagination.PageOffset)).
  48. Find(&eventItem).Error; err != nil {
  49. return nil, xerr.WithStack(err)
  50. }
  51. penMap := s.PenMap(ctx, userModel.AppPasture.Id)
  52. calendarMap := CalendarTypeMap()
  53. return &pasturePb.CalendarToDoResponse{
  54. Code: http.StatusOK,
  55. Msg: "ok",
  56. Data: &pasturePb.CalendarToDoData{
  57. List: model.EventItemSlice(eventItem).ToPB(penMap, calendarMap),
  58. Total: int32(count),
  59. PageSize: pagination.PageSize,
  60. Page: pagination.Page,
  61. },
  62. }, nil
  63. }
  64. func (s *StoreEntry) CalendarList(ctx context.Context, req *pasturePb.CalendarRequest) (*pasturePb.CalendarResponse, error) {
  65. userModel, err := s.GetUserModel(ctx)
  66. if err != nil {
  67. return nil, xerr.WithStack(err)
  68. }
  69. calendarList := make([]*model.Calendar, 0)
  70. if err = s.DB.Model(&model.Calendar{}).
  71. Where("show_day >= ?", req.ShowStartDay).
  72. Where("show_day <= ?", req.ShowEndDay).
  73. Where("pasture_id = ?", userModel.AppPasture.Id).
  74. Where("is_show = ?", pasturePb.IsShow_Ok).
  75. Find(&calendarList).Error; err != nil {
  76. return nil, xerr.WithStack(err)
  77. }
  78. return &pasturePb.CalendarResponse{
  79. Code: http.StatusOK,
  80. Msg: "ok",
  81. Data: model.CalendarSlice(calendarList).ToPB(),
  82. }, nil
  83. }
  84. func (s *StoreEntry) CalendarTableDetail(
  85. ctx context.Context,
  86. req *pasturePb.CalendarTableRequest,
  87. pagination *pasturePb.PaginationModel,
  88. ) (interface{}, error) {
  89. userModel, err := s.GetUserModel(ctx)
  90. if err != nil {
  91. return nil, xerr.WithStack(err)
  92. }
  93. if req.Start != time.Now().Format(model.LayoutDate2) {
  94. return nil, xerr.Custom("只能获取当天的数据")
  95. }
  96. newCalendar := &model.Calendar{}
  97. if err = s.DB.Model(&model.Calendar{}).
  98. Where("calendar_type = ?", req.CalendarType).
  99. Where("show_day = ?", req.Start).
  100. Where("is_show = ?", pasturePb.IsShow_Ok).
  101. Where("pasture_id = ?", userModel.AppPasture.Id).
  102. First(newCalendar).Error; err != nil {
  103. return nil, xerr.WithStack(err)
  104. }
  105. if newCalendar.Id <= 0 {
  106. return nil, xerr.New("不存在该日历数据")
  107. }
  108. return s.getCalendarCowList(ctx, req.CalendarType, req.Start, pagination, userModel.AppPasture.Id)
  109. }
  110. func (s *StoreEntry) getCalendarCowList(
  111. ctx context.Context,
  112. calendarType pasturePb.CalendarType_Kind,
  113. showDay string,
  114. pagination *pasturePb.PaginationModel,
  115. pastureId int64,
  116. ) (interface{}, error) {
  117. req := &pasturePb.ItemsRequest{EndDay: showDay, CalendarType: calendarType, Status: pasturePb.IsShow_No, PastureId: int32(pastureId)}
  118. switch calendarType {
  119. case pasturePb.CalendarType_Immunisation: // 免疫
  120. return s.ImmunisationCowList(ctx, req, pagination)
  121. case pasturePb.CalendarType_PG, pasturePb.CalendarType_RnGH: // 同期
  122. return s.SameTimeCowList(ctx, req, pagination)
  123. case pasturePb.CalendarType_Pregnancy_Check: // 孕检
  124. return s.PregnancyCheckCowList(ctx, req, pagination)
  125. case pasturePb.CalendarType_WorkOrder: // 工作单
  126. return s.WorkOrderCowList(ctx, req, pagination)
  127. case pasturePb.CalendarType_Weaning: // 断奶
  128. return s.WeaningCowList(ctx, req, pagination)
  129. case pasturePb.CalendarType_Treatment: // 治疗
  130. return s.TreatmentCowList(ctx, req, pagination)
  131. case pasturePb.CalendarType_Mating: // 配种
  132. return s.MatingCowList(ctx, req, pagination)
  133. case pasturePb.CalendarType_Calving: // 产犊
  134. return s.CalvingCowList(ctx, req, pagination)
  135. default:
  136. return nil, xerr.New("不支持的日历类型")
  137. }
  138. }
  139. func (s *StoreEntry) ImmunisationCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.ImmunizationItemsResponse, error) {
  140. userModel, err := s.GetUserModel(ctx)
  141. if err != nil {
  142. return nil, xerr.WithStack(err)
  143. }
  144. eventImmunizationPlanList := make([]*model.EventImmunizationPlan, 0)
  145. count := int64(0)
  146. pref := s.DB.Model(&model.EventImmunizationPlan{}).
  147. Where("status = ?", pasturePb.IsShow_No).
  148. Where("pasture_id = ?", userModel.AppPasture.Id)
  149. if req.StartDay != "" {
  150. dateTime := util.TimeParseLocalUnix(req.StartDay)
  151. pref.Where("plan_day >= ?", dateTime)
  152. }
  153. if req.EndDay != "" {
  154. dateTime := util.TimeParseLocalEndUnix(req.EndDay)
  155. pref.Where("plan_day <= ?", dateTime)
  156. }
  157. if req.CowId > 0 {
  158. pref.Where("cow_id = ?", req.CowId)
  159. }
  160. if req.ImmunizationId > 0 {
  161. pref.Where("plan_id = ?", req.ImmunizationId)
  162. }
  163. if req.PenId > 0 {
  164. pref.Where("pen_id = ?", req.PenId)
  165. }
  166. if req.Status > 0 {
  167. pref.Where("status = ?", req.Status)
  168. }
  169. if err = pref.Order("id desc").
  170. Count(&count).
  171. Limit(int(pagination.PageSize)).
  172. Offset(int(pagination.PageOffset)).
  173. Order("id desc").
  174. Find(&eventImmunizationPlanList).Error; err != nil {
  175. return nil, xerr.WithStack(err)
  176. }
  177. return &pasturePb.ImmunizationItemsResponse{
  178. Code: http.StatusOK,
  179. Msg: "ok",
  180. Data: &pasturePb.ImmunizationItemsData{
  181. Total: int32(count),
  182. Page: pagination.Page,
  183. PageSize: pagination.PageSize,
  184. Header: map[string]string{
  185. "id": "编号",
  186. "cowId": "牛号",
  187. "earNumber": "耳标号",
  188. "penName": "栏舍",
  189. "dayAge": "日龄",
  190. "planDay": "免疫开始时间",
  191. "immunizationPlanName": "免疫名称",
  192. "status": "状态",
  193. },
  194. List: model.EventImmunizationPlanSlice(eventImmunizationPlanList).ToPB(),
  195. },
  196. }, nil
  197. }
  198. func (s *StoreEntry) SameTimeCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.SameTimeItemResponse, error) {
  199. userModel, err := s.GetUserModel(ctx)
  200. if err != nil {
  201. return nil, xerr.WithStack(err)
  202. }
  203. sameTimeBodyList := make([]*model.SameTimeItemBody, 0)
  204. count := int64(0)
  205. pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventCowSameTime).TableName())).
  206. Select(`a.id,a.cow_id,a.ear_number,a.pen_name,a.status,a.same_time_type,b.breed_status,a.same_time_name,
  207. b.cow_type,b.day_age,b.calving_age,b.abortion_age,b.last_calving_at,b.last_abortion_at`).
  208. Joins("left join cow as b on a.cow_id = b.id").
  209. Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission).
  210. Where("a.pasture_id = ?", userModel.AppPasture.Id).
  211. Where("a.status = ?", pasturePb.IsShow_No)
  212. if req.EndDay != "" {
  213. dateTime := util.TimeParseLocalEndUnix(req.EndDay)
  214. pref.Where("a.plan_day <= ?", dateTime)
  215. }
  216. if req.CalendarType > 0 {
  217. pref.Where("a.same_time_type = ?", req.CalendarType)
  218. }
  219. if req.CowType > 0 {
  220. pref.Where("b.cow_type = ?", req.CowType)
  221. }
  222. if req.Status > 0 {
  223. pref.Where("a.status = ?", pasturePb.IsShow_No)
  224. }
  225. if err = pref.Order("a.id desc").Count(&count).
  226. Limit(int(pagination.PageSize)).
  227. Offset(int(pagination.PageOffset)).
  228. Order("id desc").
  229. Find(&sameTimeBodyList).Error; err != nil {
  230. return nil, xerr.WithStack(err)
  231. }
  232. breedStatusMap := s.CowBreedStatusMap()
  233. penMap := s.PenMap(ctx, int64(req.PastureId))
  234. sameTimeTypeMap := s.SameTimeTypeMap()
  235. return &pasturePb.SameTimeItemResponse{
  236. Code: http.StatusOK,
  237. Msg: "ok",
  238. Data: &pasturePb.SameTimeItemsData{
  239. Total: int32(count),
  240. Page: pagination.Page,
  241. PageSize: pagination.PageSize,
  242. Header: map[string]string{
  243. "id": "编号",
  244. "cowId": "牛号",
  245. "earNumber": "耳标号",
  246. "breedStatusName": "繁殖状态",
  247. "cowTypeName": "牛只类型",
  248. "penName": "栏舍",
  249. "lact": "胎次",
  250. "calvingAge": "产后天数",
  251. "abortionAge": "流产天数",
  252. "dayAge": "日龄",
  253. "status": "状态",
  254. "sameTimeTypeName": "处理方式",
  255. "matingTimes": "本胎次配次",
  256. "calvingAtFormat": "产犊日期",
  257. "abortionAtFormat": "流产日期",
  258. "sameTimeName": "同期名称",
  259. },
  260. List: model.SameTimeBodySlice(sameTimeBodyList).ToPB(breedStatusMap, penMap, sameTimeTypeMap),
  261. },
  262. }, nil
  263. }
  264. func (s *StoreEntry) PregnancyCheckCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.PregnancyCheckItemsResponse, error) {
  265. userModel, err := s.GetUserModel(ctx)
  266. if err != nil {
  267. return nil, xerr.WithStack(err)
  268. }
  269. newPregnancyCheckItems := make([]*pasturePb.PregnancyCheckItems, 0)
  270. var count int64
  271. pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventPregnantCheck).TableName())).
  272. Select("a.id,a.cow_id,a.ear_number,a.pen_id,a.status,b.breed_status,b.pen_name,b.cow_type,b.day_age,b.calving_age,b.abortion_age,a.bull_id").
  273. Joins("left join cow as b on a.cow_id = b.id").
  274. Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission).
  275. Where("a.pasture_id = ?", userModel.AppPasture.Id).
  276. Where("a.status = ?", pasturePb.IsShow_No)
  277. if req.EndDay != "" {
  278. dateTime := util.TimeParseLocalEndUnix(req.EndDay)
  279. pref.Where("plan_day <= ?", dateTime)
  280. }
  281. if req.CowType > 0 {
  282. pref.Where("cow_type = ?", req.CowType)
  283. }
  284. if req.Status > 0 {
  285. pref.Where("a.status = ?", req.Status)
  286. }
  287. if req.PregnantCheckType > 0 {
  288. pref.Where("pregnant_check_name = ?", model.PregnantCheckNameValueMap[req.PregnantCheckType])
  289. }
  290. if err = pref.Order("id desc").
  291. Count(&count).
  292. Limit(int(pagination.PageSize)).
  293. Offset(int(pagination.PageOffset)).
  294. Order("id desc").
  295. Find(&newPregnancyCheckItems).Error; err != nil {
  296. return nil, xerr.WithStack(err)
  297. }
  298. return &pasturePb.PregnancyCheckItemsResponse{
  299. Code: http.StatusOK,
  300. Msg: "ok",
  301. Data: &pasturePb.PregnancyCheckItemsData{
  302. Total: int32(count),
  303. Page: pagination.Page,
  304. PageSize: pagination.PageSize,
  305. Header: map[string]string{
  306. "id": "编号",
  307. "cowId": "牛号",
  308. "earNumber": "耳标号",
  309. "cowTypeName": "牛只类型",
  310. "penName": "栏舍",
  311. "lact": "胎次",
  312. "dayAge": "日龄",
  313. "planDay": "孕检日期",
  314. "checkTypeName": "孕检名称",
  315. "status": "状态",
  316. "matingTimes": "配次",
  317. "calvingAtFormat": "产检日期",
  318. "matingAtFormat": "配种日期",
  319. "matingAge": "配后天数",
  320. "bullId": "配种公牛",
  321. },
  322. List: newPregnancyCheckItems,
  323. },
  324. }, nil
  325. }
  326. func (s *StoreEntry) WeaningCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.WeaningItemsResponse, error) {
  327. userModel, err := s.GetUserModel(ctx)
  328. if err != nil {
  329. return nil, xerr.WithStack(err)
  330. }
  331. weaningItems := make([]*pasturePb.WeaningItems, 0)
  332. count := int64(0)
  333. pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventWeaning).TableName())).
  334. Select("a.*,b.day_age,c.name as pen_name").
  335. Joins("left join cow as b on a.cow_id = b.id").
  336. Joins("left join pen as c on a.before_pen_id = c.id").
  337. Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission).
  338. Where("a.status = ?", pasturePb.IsShow_No).
  339. Where("a.pasture_id = ?", userModel.AppPasture.Id)
  340. if req.EndDay != "" {
  341. dateTime := util.TimeParseLocalEndUnix(req.EndDay)
  342. pref.Where("a.plan_day <= ?", dateTime)
  343. }
  344. if req.Status > 0 {
  345. pref.Where("a.status = ?", req.Status)
  346. }
  347. if err = pref.Order("a.id desc").Count(&count).
  348. Limit(int(pagination.PageSize)).
  349. Offset(int(pagination.PageOffset)).
  350. Find(&weaningItems).Error; err != nil {
  351. return nil, xerr.WithStack(err)
  352. }
  353. return &pasturePb.WeaningItemsResponse{
  354. Code: http.StatusOK,
  355. Msg: "ok",
  356. Data: &pasturePb.WeaningItemsData{
  357. Total: int32(count),
  358. Page: pagination.Page,
  359. PageSize: pagination.PageSize,
  360. Header: map[string]string{
  361. "id": "编号",
  362. "cowId": "牛号",
  363. "ear_number": "耳标号",
  364. "penName": "栏舍",
  365. "planDay": "断奶日期",
  366. "dayAge": "日龄",
  367. "status": "状态",
  368. },
  369. List: weaningItems,
  370. },
  371. }, nil
  372. }
  373. func (s *StoreEntry) MatingCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.MatingItemsResponse, error) {
  374. userModel, err := s.GetUserModel(ctx)
  375. if err != nil {
  376. return nil, xerr.WithStack(err)
  377. }
  378. matingItems := make([]*pasturePb.MatingItems, 0)
  379. count := int64(0)
  380. pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventMating).TableName())).
  381. Select(`a.id,a.cow_id,a.status,a.ear_number,
  382. CASE a.expose_estrus_type
  383. WHEN 1 THEN '脖环揭发'
  384. WHEN 2 THEN '脚环/计步器'
  385. WHEN 3 THEN '自然发情'
  386. WHEN 4 THEN '同期'
  387. ELSE '其他'
  388. END AS expose_estrus_type_name,
  389. b.breed_status,b.cow_type,b.pen_id,b.day_age,b.calving_age,b.abortion_age,c.name as pen_name`).
  390. Joins("left join cow as b on a.cow_id = b.id").
  391. Joins("left join pen as c on a.pen_id = c.id").
  392. Where("a.pasture_id = ?", userModel.AppPasture.Id).
  393. Where("a.status = ?", pasturePb.IsShow_No)
  394. if req.EndDay != "" {
  395. dateTime := util.TimeParseLocalEndUnix(req.EndDay)
  396. pref.Where("a.plan_day <= ?", dateTime)
  397. }
  398. if req.PenId > 0 {
  399. pref.Where("a.pen_id = ?", req.PenId)
  400. }
  401. if req.Status > 0 {
  402. pref.Where("a.status = ?", req.Status)
  403. }
  404. if err = pref.Order("a.id desc").
  405. Count(&count).
  406. Limit(int(pagination.PageSize)).
  407. Offset(int(pagination.PageOffset)).
  408. Find(&matingItems).Error; err != nil {
  409. return nil, xerr.WithStack(err)
  410. }
  411. return &pasturePb.MatingItemsResponse{
  412. Code: http.StatusOK,
  413. Msg: "ok",
  414. Data: &pasturePb.MatingItemsData{
  415. Total: int32(count),
  416. Page: pagination.Page,
  417. PageSize: pagination.PageSize,
  418. Header: map[string]string{
  419. "id": "编号",
  420. "cowId": "牛号",
  421. "earNumber": "耳标号",
  422. "breedStatusName": "繁殖状态",
  423. "cowTypeName": "牛只类型",
  424. "penName": "栏舍",
  425. "lact": "胎次",
  426. "calvingAge": "产后天数",
  427. "abortionAge": "流产天数",
  428. "dayAge": "日龄",
  429. "status": "状态",
  430. "exposeEstrusTypeName": "发情揭发方式",
  431. },
  432. List: matingItems,
  433. },
  434. }, nil
  435. }
  436. func (s *StoreEntry) CalvingCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.CalvingItemsResponse, error) {
  437. userModel, err := s.GetUserModel(ctx)
  438. if err != nil {
  439. return nil, xerr.WithStack(err)
  440. }
  441. calvingItems := make([]*pasturePb.CalvingItems, 0)
  442. count := int64(0)
  443. pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventCalving).TableName())).
  444. Select(`a.id,a.cow_id,a.ear_number,a.status,b.breed_status,b.pen_id,DATE_FORMAT(FROM_UNIXTIME(last_mating_at), '%Y-%m-%d') AS mating_at_format,
  445. b.day_age,b.last_bull_number as bull_id,DATEDIFF(NOW(),FROM_UNIXTIME(last_mating_at)) AS mating_age,DATE_FORMAT(FROM_UNIXTIME(a.plan_day), '%Y-%m-%d') AS plan_day`).
  446. Joins("left join cow as b on a.cow_id = b.id").
  447. Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission).
  448. Where("a.pasture_id = ?", userModel.AppPasture.Id)
  449. if req.EndDay != "" {
  450. dateTime := util.TimeParseLocalEndUnix(req.EndDay)
  451. pref.Where("a.plan_day <= ?", dateTime)
  452. }
  453. if req.Status > 0 {
  454. pref.Where("a.status = ?", req.Status)
  455. }
  456. if err := pref.Order("a.id desc").
  457. Count(&count).
  458. Limit(int(pagination.PageSize)).
  459. Offset(int(pagination.PageOffset)).
  460. Find(&calvingItems).Error; err != nil {
  461. return nil, xerr.WithStack(err)
  462. }
  463. breedStatusMap := s.CowBreedStatusMap()
  464. for _, v := range calvingItems {
  465. breedStatusName := ""
  466. if breedStatus, ok := breedStatusMap[v.BreedStatus]; ok {
  467. breedStatusName = breedStatus
  468. }
  469. v.BreedStatusName = breedStatusName
  470. }
  471. return &pasturePb.CalvingItemsResponse{
  472. Code: http.StatusOK,
  473. Msg: "ok",
  474. Data: &pasturePb.CalvingItemsData{
  475. Total: int32(count),
  476. Page: pagination.Page,
  477. PageSize: pagination.PageSize,
  478. Header: map[string]string{
  479. "id": "编号",
  480. "cowId": "牛号",
  481. "earNumber": "耳标号",
  482. "breedStatusName": "繁殖状态",
  483. "penName": "栏舍",
  484. "lact": "胎次",
  485. "matingAge": "配后天数",
  486. "dayAge": "日龄",
  487. "status": "是否完成",
  488. "bullId": "配种公牛号",
  489. "planDay": "预产时间",
  490. "matingAtFormat": "配种时间",
  491. },
  492. List: calvingItems,
  493. },
  494. }, nil
  495. }
  496. // WorkOrderCowList 暂时不处理工单业务
  497. func (s *StoreEntry) WorkOrderCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (interface{}, error) {
  498. return nil, nil
  499. }
  500. // TreatmentCowList 治疗清单
  501. func (s *StoreEntry) TreatmentCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (interface{}, error) {
  502. return nil, nil
  503. }