|
@@ -4,6 +4,7 @@ import (
|
|
|
"context"
|
|
|
"fmt"
|
|
|
"kpt-pasture/model"
|
|
|
+ "kpt-pasture/util"
|
|
|
"net/http"
|
|
|
"time"
|
|
|
|
|
@@ -37,7 +38,7 @@ func (s *StoreEntry) CalendarToDoList(ctx context.Context, req *pasturePb.Calend
|
|
|
|
|
|
}
|
|
|
|
|
|
- if req.CalendarType > pasturePb.CalendarType_Invalid {
|
|
|
+ if req.CalendarType > 0 {
|
|
|
pref.Where("calendar_type = ?", req.CalendarType)
|
|
|
}
|
|
|
|
|
@@ -109,237 +110,313 @@ func (s *StoreEntry) CalendarTableDetail(
|
|
|
if newCalendar.Id <= 0 {
|
|
|
return nil, xerr.New("不存在该日历数据")
|
|
|
}
|
|
|
-
|
|
|
return s.getCalendarCowList(ctx, req.CalendarType, req.Start, pagination)
|
|
|
}
|
|
|
|
|
|
func (s *StoreEntry) getCalendarCowList(
|
|
|
ctx context.Context,
|
|
|
calendarType pasturePb.CalendarType_Kind,
|
|
|
- startDate string,
|
|
|
- pagination *pasturePb.PaginationModel) (*model.CalendarResponse, error) {
|
|
|
+ showDay string,
|
|
|
+ pagination *pasturePb.PaginationModel) (interface{}, error) {
|
|
|
+ req := &pasturePb.ItemsRequest{EndDay: showDay, CalendarType: calendarType, Status: pasturePb.IsShow_No}
|
|
|
switch calendarType {
|
|
|
case pasturePb.CalendarType_Immunisation: // 免疫
|
|
|
- return s.ImmunisationCowList(ctx, startDate, pagination)
|
|
|
+ return s.ImmunisationCowList(ctx, req, pagination)
|
|
|
case pasturePb.CalendarType_PG, pasturePb.CalendarType_RnGH: // 同期
|
|
|
- return s.SameTimeCowList(ctx, startDate, pagination, calendarType)
|
|
|
+ return s.SameTimeCowList(ctx, req, pagination)
|
|
|
case pasturePb.CalendarType_Pregnancy_Check: // 孕检
|
|
|
- return s.PregnancyCheckCowList(ctx, startDate, pagination)
|
|
|
+ return s.PregnancyCheckCowList(ctx, req, pagination)
|
|
|
case pasturePb.CalendarType_WorkOrder: // 工作单
|
|
|
- return s.WorkOrderCowList(ctx, startDate, pagination)
|
|
|
+ return s.WorkOrderCowList(ctx, req, pagination)
|
|
|
case pasturePb.CalendarType_Weaning: // 断奶
|
|
|
- return s.WeaningCowList(ctx, startDate, pagination)
|
|
|
+ return s.WeaningCowList(ctx, req, pagination)
|
|
|
case pasturePb.CalendarType_Treatment: // 治疗
|
|
|
- return s.TreatmentCowList(ctx, startDate, pagination)
|
|
|
+ return s.TreatmentCowList(ctx, req, pagination)
|
|
|
case pasturePb.CalendarType_Mating: // 配种
|
|
|
- return s.MatingCowList(ctx, startDate, pagination)
|
|
|
+ return s.MatingCowList(ctx, req, pagination)
|
|
|
default:
|
|
|
return nil, xerr.New("不支持的日历类型")
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func (s *StoreEntry) ImmunisationCowList(ctx context.Context, dateTime string, pagination *pasturePb.PaginationModel) (*model.CalendarResponse, error) {
|
|
|
- immunizationPlanCowList := make([]*model.CowImmunizationPlan, 0)
|
|
|
+func (s *StoreEntry) ImmunisationCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.ImmunizationItemsResponse, error) {
|
|
|
+ eventImmunizationPlanList := make([]*model.EventImmunizationPlan, 0)
|
|
|
count := int64(0)
|
|
|
- if err := s.DB.Model(&model.CowImmunizationPlan{}).
|
|
|
- Where("plan_day <= ?", dateTime).
|
|
|
- Where("status = ?", pasturePb.IsShow_No).
|
|
|
- Order("id desc").Count(&count).Limit(int(pagination.PageSize)).Offset(int(pagination.PageOffset)).
|
|
|
- Find(&immunizationPlanCowList).Error; err != nil {
|
|
|
+ pref := s.DB.Model(&model.EventImmunizationPlan{})
|
|
|
+ if req.StartDay != "" {
|
|
|
+ dateTime := util.TimeParseLocalUnix(req.StartDay)
|
|
|
+ pref.Where("plan_day >= ?", dateTime)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.EndDay != "" {
|
|
|
+ dateTime := util.TimeParseLocalEndUnix(req.EndDay)
|
|
|
+ pref.Where("plan_day <= ?", dateTime)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.CowId > 0 {
|
|
|
+ pref.Where("cow_id = ?", req.CowId)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.ImmunizationId > 0 {
|
|
|
+ pref.Where("plan_id = ?", req.ImmunizationId)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.Lact >= 0 {
|
|
|
+ pref.Where("lact = ?", req.Lact)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.PenId > 0 {
|
|
|
+ pref.Where("pen_id = ?", req.PenId)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.Status > 0 {
|
|
|
+ pref.Where("status = ?", req.Status)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := pref.Order("id desc").
|
|
|
+ Count(&count).
|
|
|
+ Limit(int(pagination.PageSize)).
|
|
|
+ Offset(int(pagination.PageOffset)).
|
|
|
+ Order("id desc").
|
|
|
+ Find(&eventImmunizationPlanList).Error; err != nil {
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
|
|
|
- return &model.CalendarResponse{
|
|
|
+ return &pasturePb.ImmunizationItemsResponse{
|
|
|
Code: http.StatusOK,
|
|
|
Message: "ok",
|
|
|
- Data: &model.CalendarData{
|
|
|
+ Data: &pasturePb.ImmunizationItemsData{
|
|
|
Total: int32(count),
|
|
|
Page: pagination.Page,
|
|
|
PageSize: pagination.PageSize,
|
|
|
- Header: model.ImmunizationCalendarHeader{
|
|
|
- Id: "编号",
|
|
|
- CowId: "牛号",
|
|
|
- PlanStartTime: "免疫开始时间",
|
|
|
- ImmunizationPlanName: "免疫名称",
|
|
|
- Status: "状态",
|
|
|
+ Header: map[string]string{
|
|
|
+ "id": "编号",
|
|
|
+ "cowId": "牛号",
|
|
|
+ "penName": "栏舍",
|
|
|
+ "dayAge": "日龄",
|
|
|
+ "planStartTime": "免疫开始时间",
|
|
|
+ "immunizationPlanName": "免疫名称",
|
|
|
+ "status": "状态",
|
|
|
},
|
|
|
- List: model.ImmunizationPlanCowSlice(immunizationPlanCowList).ToPB(),
|
|
|
+ List: model.EventImmunizationPlanSlice(eventImmunizationPlanList).ToPB(),
|
|
|
},
|
|
|
}, nil
|
|
|
|
|
|
}
|
|
|
|
|
|
-func (s *StoreEntry) SameTimeCowList(ctx context.Context, dateTime string, pagination *pasturePb.PaginationModel, calendarType pasturePb.CalendarType_Kind) (*model.CalendarResponse, error) {
|
|
|
+func (s *StoreEntry) SameTimeCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.SameTimeItemResponse, error) {
|
|
|
sameTimeBodyList := make([]*model.SameTimeBody, 0)
|
|
|
count := int64(0)
|
|
|
pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventCowSameTime).TableName())).
|
|
|
- Select("a.id,a.cow_id,a.status,b.breed_status,b.cow_type,b.pen_id,b.day_age,b.calving_age,b.abortion_age").
|
|
|
+ Select("a.id,a.cow_id,a.pen_name,a.status,b.breed_status,b.cow_type,b.day_age,b.calving_age,b.abortion_age").
|
|
|
Joins("left join cow as b on a.cow_id = b.id").
|
|
|
- Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission).
|
|
|
- Where("a.plan_day <= ?", dateTime).
|
|
|
- Where("a.status = ?", pasturePb.IsShow_No)
|
|
|
+ Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission)
|
|
|
+
|
|
|
+ if req.EndDay != "" {
|
|
|
+ dateTime := util.TimeParseLocalEndUnix(req.EndDay)
|
|
|
+ pref.Where("a.plan_day <= ?", dateTime)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.CalendarType > 0 {
|
|
|
+ pref.Where("a.same_time_type = ?", req.CalendarType)
|
|
|
+ }
|
|
|
|
|
|
- if calendarType == pasturePb.CalendarType_PG {
|
|
|
- pref.Where("a.same_time_type = ?", calendarType)
|
|
|
+ if req.CowType >= 0 {
|
|
|
+ pref.Where("b.cow_type = ?", req.CowType)
|
|
|
}
|
|
|
|
|
|
- if calendarType == pasturePb.CalendarType_RnGH {
|
|
|
- pref.Where("a.same_time_type = ?", calendarType)
|
|
|
+ if req.Status > 0 {
|
|
|
+ pref.Where("a.status = ?", pasturePb.IsShow_No)
|
|
|
}
|
|
|
|
|
|
if err := pref.Order("a.id desc").Count(&count).
|
|
|
Limit(int(pagination.PageSize)).
|
|
|
Offset(int(pagination.PageOffset)).
|
|
|
+ Order("id desc").
|
|
|
Find(&sameTimeBodyList).Error; err != nil {
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
- cowTypeMap := s.CowTypeMap()
|
|
|
breedStatusMap := s.CowBreedStatusMap()
|
|
|
penMap := s.PenMap(ctx)
|
|
|
- return &model.CalendarResponse{
|
|
|
+ return &pasturePb.SameTimeItemResponse{
|
|
|
Code: http.StatusOK,
|
|
|
Message: "ok",
|
|
|
- Data: &model.CalendarData{
|
|
|
+ Data: &pasturePb.SameTimeItemsData{
|
|
|
Total: int32(count),
|
|
|
Page: pagination.Page,
|
|
|
PageSize: pagination.PageSize,
|
|
|
- Header: model.SameTimeHeader{
|
|
|
- Id: "编号",
|
|
|
- CowId: "牛号",
|
|
|
- BreedStatusName: "繁殖状态",
|
|
|
- CowTypeName: "牛只类型",
|
|
|
- PenName: "栏舍",
|
|
|
- Lact: "胎次",
|
|
|
- CalvingAge: "产后天数",
|
|
|
- AbortionAge: "流产天数",
|
|
|
- DayAge: "日龄",
|
|
|
- Status: "状态",
|
|
|
+ Header: map[string]string{
|
|
|
+ "id": "编号",
|
|
|
+ "cowId": "牛号",
|
|
|
+ "breedStatusName": "繁殖状态",
|
|
|
+ "cowTypeName": "牛只类型",
|
|
|
+ "penName": "栏舍",
|
|
|
+ "lact": "胎次",
|
|
|
+ "calvingAge": "产后天数",
|
|
|
+ "abortionAge": "流产天数",
|
|
|
+ "dayAge": "日龄",
|
|
|
+ "status": "状态",
|
|
|
},
|
|
|
- List: model.SameTimeBodySlice(sameTimeBodyList).ToPB(cowTypeMap, breedStatusMap, penMap),
|
|
|
+ List: model.SameTimeBodySlice(sameTimeBodyList).ToPB(breedStatusMap, penMap),
|
|
|
},
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
|
-func (s *StoreEntry) PregnancyCheckCowList(ctx context.Context, dateTime string, pagination *pasturePb.PaginationModel) (*model.CalendarResponse, error) {
|
|
|
- newCowPregnancyCheckList := make([]*model.EventPregnantCheck, 0)
|
|
|
+func (s *StoreEntry) PregnancyCheckCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.PregnancyCheckItemsResponse, error) {
|
|
|
+ newPregnancyCheckItems := make([]*pasturePb.PregnancyCheckItems, 0)
|
|
|
var count int64
|
|
|
- if err := s.DB.Model(&model.EventPregnantCheck{}).
|
|
|
- Where("plan_day <= ?", dateTime).
|
|
|
- Where("status = ?", pasturePb.IsShow_No).
|
|
|
- Order("id desc").Count(&count).
|
|
|
+ pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventPregnantCheck).TableName())).
|
|
|
+ Select("a.id,a.cow_id,a.pen_id,a.status,b.breed_status,b.cow_type,b.day_age,b.calving_age,b.abortion_age,a.bull_id").
|
|
|
+ Joins("left join cow as b on a.cow_id = b.id").
|
|
|
+ Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission)
|
|
|
+
|
|
|
+ if req.EndDay != "" {
|
|
|
+ dateTime := util.TimeParseLocalEndUnix(req.EndDay)
|
|
|
+ pref.Where("plan_day <= ?", dateTime)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.CowType > 0 {
|
|
|
+ pref.Where("cow_type = ?", req.CowType)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.Status > 0 {
|
|
|
+ pref.Where("a.status = ?", req.Status)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := pref.Order("id desc").
|
|
|
+ Count(&count).
|
|
|
Limit(int(pagination.PageSize)).
|
|
|
Offset(int(pagination.PageOffset)).
|
|
|
- Find(&newCowPregnancyCheckList).Error; err != nil {
|
|
|
+ Order("id desc").
|
|
|
+ Find(&newPregnancyCheckItems).Error; err != nil {
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
|
|
|
- return &model.CalendarResponse{
|
|
|
+ return &pasturePb.PregnancyCheckItemsResponse{
|
|
|
Code: http.StatusOK,
|
|
|
Message: "ok",
|
|
|
- Data: &model.CalendarData{
|
|
|
+ Data: &pasturePb.PregnancyCheckItemsData{
|
|
|
Total: int32(count),
|
|
|
Page: pagination.Page,
|
|
|
PageSize: pagination.PageSize,
|
|
|
- Header: model.PregnantCheckHeader{
|
|
|
- Id: "编号",
|
|
|
- CowId: "牛号",
|
|
|
- CowType: "牛只类型",
|
|
|
- PenName: "栏舍",
|
|
|
- Lact: "胎次",
|
|
|
- DayAge: "日龄",
|
|
|
- PlanDay: "孕检日期",
|
|
|
- CheckName: "孕检名称",
|
|
|
+ Header: map[string]string{
|
|
|
+ "id": "编号",
|
|
|
+ "cowId": "牛号",
|
|
|
+ "cowTypeName": "牛只类型",
|
|
|
+ "penName": "栏舍",
|
|
|
+ "lact": "胎次",
|
|
|
+ "dayAge": "日龄",
|
|
|
+ "planDay": "孕检日期",
|
|
|
+ "checkTypeName": "孕检名称",
|
|
|
+ "status": "状态",
|
|
|
+ "matingTimes": "配次",
|
|
|
+ "calvingAtFormat": "产检日期",
|
|
|
+ "matingAtFormat": "配种日期",
|
|
|
+ "matingAge": "配后天数",
|
|
|
+ "bullId": "配种公牛",
|
|
|
},
|
|
|
- List: model.EventPregnantCheckSlice(newCowPregnancyCheckList).ToPB2(),
|
|
|
+ List: newPregnancyCheckItems,
|
|
|
},
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
|
-func (s *StoreEntry) WorkOrderCowList(ctx context.Context, dateTime string, pagination *pasturePb.PaginationModel) (*model.CalendarResponse, error) {
|
|
|
- return nil, nil
|
|
|
-}
|
|
|
-
|
|
|
-func (s *StoreEntry) WeaningCowList(ctx context.Context, dateTime string, pagination *pasturePb.PaginationModel) (*model.CalendarResponse, error) {
|
|
|
- weaningBodyList := make([]*model.WeaningBody, 0)
|
|
|
+func (s *StoreEntry) WeaningCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.WeaningItemsResponse, error) {
|
|
|
+ weaningItems := make([]*pasturePb.WeaningItems, 0)
|
|
|
count := int64(0)
|
|
|
|
|
|
- pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventCowSameTime).TableName())).
|
|
|
+ pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventWeaning).TableName())).
|
|
|
Select("a.*,b.day_age").
|
|
|
Joins("left join cow as b on a.cow_id = b.id").
|
|
|
- Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission).
|
|
|
- Where("a.plan_day <= ?", dateTime).
|
|
|
- Where("a.status = ?", pasturePb.IsShow_No)
|
|
|
+ Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission)
|
|
|
+
|
|
|
+ if req.EndDay != "" {
|
|
|
+ dateTime := util.TimeParseLocalEndUnix(req.EndDay)
|
|
|
+ pref.Where("a.plan_day <= ?", dateTime)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.Status > 0 {
|
|
|
+ pref.Where("a.status = ?", req.Status)
|
|
|
+ }
|
|
|
|
|
|
if err := pref.Order("a.id desc").Count(&count).
|
|
|
Limit(int(pagination.PageSize)).
|
|
|
Offset(int(pagination.PageOffset)).
|
|
|
- Find(&weaningBodyList).Error; err != nil {
|
|
|
+ Find(&weaningItems).Error; err != nil {
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
|
|
|
- return &model.CalendarResponse{
|
|
|
+ return &pasturePb.WeaningItemsResponse{
|
|
|
Code: http.StatusOK,
|
|
|
Message: "ok",
|
|
|
- Data: &model.CalendarData{
|
|
|
+ Data: &pasturePb.WeaningItemsData{
|
|
|
Total: int32(count),
|
|
|
Page: pagination.Page,
|
|
|
PageSize: pagination.PageSize,
|
|
|
- Header: model.WeaningHeader{
|
|
|
- Id: "编号",
|
|
|
- CowId: "牛号",
|
|
|
- PenName: "栏舍",
|
|
|
- PlanDay: "断奶日期",
|
|
|
- DayAge: "日龄",
|
|
|
- Status: "状态",
|
|
|
+ Header: map[string]string{
|
|
|
+ "id": "编号",
|
|
|
+ "cowId": "牛号",
|
|
|
+ "penName": "栏舍",
|
|
|
+ "planDay": "断奶日期",
|
|
|
+ "dayAge": "日龄",
|
|
|
+ "status": "状态",
|
|
|
},
|
|
|
- List: weaningBodyList,
|
|
|
+ List: weaningItems,
|
|
|
},
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
|
-func (s *StoreEntry) TreatmentCowList(ctx context.Context, dateTime string, pagination *pasturePb.PaginationModel) (*model.CalendarResponse, error) {
|
|
|
- return nil, nil
|
|
|
-}
|
|
|
-
|
|
|
-func (s *StoreEntry) MatingCowList(ctx context.Context, dateTime string, pagination *pasturePb.PaginationModel) (*model.CalendarResponse, error) {
|
|
|
- cowMatingBodyList := make([]*model.CowMatingBody, 0)
|
|
|
+func (s *StoreEntry) MatingCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (*pasturePb.MatingItemsResponse, error) {
|
|
|
+ matingItems := make([]*pasturePb.MatingItems, 0)
|
|
|
count := int64(0)
|
|
|
- pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventCowSameTime).TableName())).
|
|
|
+ pref := s.DB.Table(fmt.Sprintf("%s as a", new(model.EventMating).TableName())).
|
|
|
Select("a.id,a.cow_id,a.status,b.breed_status,b.cow_type,b.pen_id,b.day_age,b.calving_age,b.abortion_age").
|
|
|
Joins("left join cow as b on a.cow_id = b.id").
|
|
|
- Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission).
|
|
|
- Where("a.plan_day <= ?", dateTime).
|
|
|
- Where("a.status = ?", pasturePb.IsShow_No)
|
|
|
+ Where("b.admission_status = ?", pasturePb.AdmissionStatus_Admission)
|
|
|
+
|
|
|
+ if req.EndDay != "" {
|
|
|
+ dateTime := util.TimeParseLocalEndUnix(req.EndDay)
|
|
|
+ pref.Where("a.plan_day <= ?", dateTime)
|
|
|
+ }
|
|
|
+
|
|
|
+ if req.Status > 0 {
|
|
|
+ pref.Where("a.status = ?", req.Status)
|
|
|
+ }
|
|
|
|
|
|
if err := pref.Order("a.id desc").Count(&count).
|
|
|
Limit(int(pagination.PageSize)).
|
|
|
Offset(int(pagination.PageOffset)).
|
|
|
- Find(&cowMatingBodyList).Error; err != nil {
|
|
|
+ Find(&matingItems).Error; err != nil {
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
- cowTypeMap := s.CowTypeMap()
|
|
|
- breedStatusMap := s.CowBreedStatusMap()
|
|
|
- penMap := s.PenMap(ctx)
|
|
|
- return &model.CalendarResponse{
|
|
|
+
|
|
|
+ return &pasturePb.MatingItemsResponse{
|
|
|
Code: http.StatusOK,
|
|
|
Message: "ok",
|
|
|
- Data: &model.CalendarData{
|
|
|
+ Data: &pasturePb.MatingItemsData{
|
|
|
Total: int32(count),
|
|
|
Page: pagination.Page,
|
|
|
PageSize: pagination.PageSize,
|
|
|
- Header: model.SameTimeHeader{
|
|
|
- Id: "编号",
|
|
|
- CowId: "牛号",
|
|
|
- BreedStatusName: "繁殖状态",
|
|
|
- CowTypeName: "牛只类型",
|
|
|
- PenName: "栏舍",
|
|
|
- Lact: "胎次",
|
|
|
- CalvingAge: "产后天数",
|
|
|
- AbortionAge: "流产天数",
|
|
|
- DayAge: "日龄",
|
|
|
- Status: "状态",
|
|
|
+ Header: map[string]string{
|
|
|
+ "id": "编号",
|
|
|
+ "cowId": "牛号",
|
|
|
+ "breedStatusName": "繁殖状态",
|
|
|
+ "cowTypeName": "牛只类型",
|
|
|
+ "penName": "栏舍",
|
|
|
+ "lact": "胎次",
|
|
|
+ "calvingAge": "产后天数",
|
|
|
+ "abortionAge": "流产天数",
|
|
|
+ "dayAge": "日龄",
|
|
|
+ "status": "状态",
|
|
|
},
|
|
|
- List: model.CowMatingBodySlice(cowMatingBodyList).ToPB(cowTypeMap, breedStatusMap, penMap),
|
|
|
+ List: matingItems,
|
|
|
},
|
|
|
}, nil
|
|
|
}
|
|
|
+
|
|
|
+func (s *StoreEntry) WorkOrderCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (interface{}, error) {
|
|
|
+ return nil, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (s *StoreEntry) TreatmentCowList(ctx context.Context, req *pasturePb.ItemsRequest, pagination *pasturePb.PaginationModel) (interface{}, error) {
|
|
|
+ return nil, nil
|
|
|
+}
|