test_data/api/test.data/report.chart.selection.go

95 lines
3.0 KiB
Go

package test_data
import (
"github.com/gin-gonic/gin"
"testData/model/response"
test_data "testData/repository/test.data"
"testData/request"
"testData/utils"
)
type IReportChartSelectionService interface {
}
type ReportChartSelectionService struct{}
func InitReportChartSelectionService() *ReportChartSelectionService {
return &ReportChartSelectionService{}
}
// @Tags 数据分析平台-生产
// @Summary 测试良率项目选项
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.ProbabilitySelection true "查询参数"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"操作成功"}"
// @Router /testData/report/probabilitySelection/product [post]
func (S *ReportChartSelectionService) GetProductSelection(c *gin.Context) {
r := request.ProbabilitySelection{}
_ = c.ShouldBind(&r)
if msg, ok := utils.ValidateInfo2CN(r); !ok {
response.FailWithMessage(msg, c)
return
}
response.OkWithData(test_data.GetProductSelection(&r), c)
}
// @Tags 数据分析平台-生产
// @Summary 测试良率批次选项
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.ProbabilitySelection true "查询参数"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"操作成功"}"
// @Router /testData/report/probabilitySelection/lot [post]
func (S *ReportChartSelectionService) GetLotSelection(c *gin.Context) {
r := request.ProbabilitySelection{}
_ = c.ShouldBind(&r)
if msg, ok := utils.ValidateInfo2CN(r); !ok {
response.FailWithMessage(msg, c)
return
}
response.OkWithData(test_data.GetLotSelection(&r), c)
}
// @Tags 数据分析平台-生产
// @Summary 测试良率项目选项-结批报告
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.ProbabilitySelection true "查询参数"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"操作成功"}"
// @Router /testData/finalReport/probabilitySelection/product [post]
func (S *ReportChartSelectionService) GetProductSelectionByFinalReport(c *gin.Context) {
r := request.ProbabilitySelection{}
_ = c.ShouldBind(&r)
if msg, ok := utils.ValidateInfo2CN(r); !ok {
response.FailWithMessage(msg, c)
return
}
response.OkWithData(test_data.GetProductSelectionByFinalReport(&r), c)
}
// @Tags 数据分析平台-生产
// @Summary 封装良率厂商选项
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.ProbabilitySelection true "查询参数"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"操作成功"}"
// @Router /testData/report/abSelection/factory [post]
func (S *ReportChartSelectionService) GetABFactorySelection(c *gin.Context) {
r := request.ProbabilitySelection{}
_ = c.ShouldBind(&r)
if msg, ok := utils.ValidateInfo2CN(r); !ok {
response.FailWithMessage(msg, c)
return
}
response.OkWithData(test_data.GetABFactorySelection(&r), c)
}