123456789101112131415161718192021222324252627282930313233 |
- package statistic
- import (
- "kpt-tmr-group/http/middleware"
- "kpt-tmr-group/pkg/apierr"
- "kpt-tmr-group/pkg/ginutil"
- operationPb "kpt-tmr-group/proto/go/backend/operation"
- "net/http"
- "github.com/gin-gonic/gin"
- )
- // SearchFormulaEstimateList 配方评估
- func SearchFormulaEstimateList(c *gin.Context) {
- req := &operationPb.SearchFormulaEstimateRequest{}
- if err := c.BindJSON(req); err != nil {
- apierr.AbortBadRequest(c, http.StatusBadRequest, err)
- return
- }
- req.Pagination = &operationPb.PaginationModel{
- Page: int32(c.GetInt(middleware.Page)),
- PageSize: int32(c.GetInt(middleware.PageSize)),
- PageOffset: int32(c.GetInt(middleware.PageOffset)),
- }
- res, err := middleware.BackendOperation(c).OpsService.SearchFormulaEstimateList(c, req)
- if err != nil {
- apierr.ClassifiedAbort(c, err)
- return
- }
- ginutil.JSONResp(c, res)
- }
|