| | |
| | | "github.com/gin-gonic/gin" |
| | | "go.uber.org/zap" |
| | | "srm/global" |
| | | "srm/model/common/request" |
| | | "srm/model/common/response" |
| | | "srm/model/purchase" |
| | | purchaserequest "srm/model/purchase/request" |
| | | purchaseRes "srm/model/purchase/response" |
| | | "srm/proto/qualityinspect" |
| | | service "srm/service/purchase" |
| | |
| | | // @Security ApiKeyAuth |
| | | // @accept application/json |
| | | // @Produce application/json |
| | | // @Param data query request.PageInfo true "页码, 每页大小" |
| | | // @Param data query purchaserequest.PurchaseSearch true "参数" |
| | | // @Success 200 {object} response.Response{data=response.PageResult,msg=string} "分页获取质检单列表,返回包括列表,总数,页码,每页数量" |
| | | // @Router /purchase/qualityInspectList [get] |
| | | func (e *QualityInspectApi) GetQualityInspectList(c *gin.Context) { |
| | | var pageInfo request.PageInfo |
| | | var pageInfo purchaserequest.PurchaseSearch |
| | | err := c.ShouldBindQuery(&pageInfo) |
| | | if err != nil { |
| | | response.FailWithMessage(err.Error(), c) |
| | |
| | | } |
| | | |
| | | // |
| | | //// QualityTest |
| | | //// @Tags QualityInspect |
| | | //// @Summary QualityTest |
| | | //// @Security ApiKeyAuth |
| | | //// @accept application/json |
| | | //// @Produce application/json |
| | | //// @Success 200 {object} response.Response{data=response.PageResult,msg=string} "分页获取质检单列表,返回包括列表,总数,页码,每页数量" |
| | | //// @Router /purchase/qualityTest [get] |
| | | //func (e *QualityInspectApi) QualityTest(c *gin.Context) { |
| | | // client := quality.NewQualityServiceClient(qualityinspect.Conn) |
| | | // list, err := client.GetQualityStatusList(context.Background(), &quality.QualityStatusRequest{WorkOrderId: []string{"GD-0116", "GD-0117", "GD-0156"}}) |
| | | // if err != nil { |
| | | // fmt.Println(err) |
| | | // response.FailWithMessage("内部错误", c) |
| | | // return |
| | | // } |
| | | // for _, status := range list.List { |
| | | // fmt.Println(status) |
| | | // } |
| | | // response.Ok(c) |
| | | //} |
| | | |
| | | // |
| | | //// GetQualityInspect |
| | | //// @Tags QualityInspect |
| | | //// @Summary 获取单一质检单信息 |