V0
This commit is contained in:
parent
eb98dd1596
commit
513e40b769
@ -191,7 +191,7 @@ func (S *TestService) ExportHistogram(c *gin.Context) {
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body request.Scatter true "CP Map图"
|
||||
// @Param data body request.Scatter true "导出散点图"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"操作成功"}"
|
||||
// @Router /testData/scatter/export [post]
|
||||
func (S *TestService) ExportScatter(c *gin.Context) {
|
||||
|
109
api/test.data/report.excel.go
Normal file
109
api/test.data/report.excel.go
Normal file
@ -0,0 +1,109 @@
|
||||
package test_data
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"testData/model/response"
|
||||
test_data "testData/repository/test.data"
|
||||
"testData/request"
|
||||
"testData/utils"
|
||||
)
|
||||
|
||||
type IFinalReportExcelInterface struct {
|
||||
}
|
||||
|
||||
type SFinalReportExcelService struct {
|
||||
}
|
||||
|
||||
func InitFinalReportExcelService() *SFinalReportExcelService {
|
||||
return &SFinalReportExcelService{}
|
||||
}
|
||||
|
||||
// @Tags 数据分析平台
|
||||
// @Summary 添加结批报告字段信息
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param date body request.CreateFinalReportExcel true "添加结批报告字段信息"
|
||||
// @Success 200 {string} string "{"success": true, "data": {}, "msg": "操作成功"}"
|
||||
// @Router /testData/finalReport/excel [post]
|
||||
func (S *SFinalReportExcelService) Create(c *gin.Context) {
|
||||
r := request.CreateFinalReportExcel{}
|
||||
_ = c.ShouldBind(&r)
|
||||
if msg, ok := utils.ValidateInfo2CN(r); !ok {
|
||||
response.FailWithMessage(msg, c)
|
||||
return
|
||||
}
|
||||
if err := test_data.CreateFinalReportExcel(&r); err != nil {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
} else {
|
||||
response.Ok(c)
|
||||
}
|
||||
}
|
||||
|
||||
// @Tags 数据分析平台
|
||||
// @Summary 分页查询结批报告字段信息
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param page query int true "页数"
|
||||
// @Param pageSize query int true "每页显示数量"
|
||||
// @Param key_word query string false "关键词"
|
||||
// @Success 200 {string} string "{"success": true, "data": {}, "msg": "操作成功"}"
|
||||
// @Router /testData/finalReport/excel [get]
|
||||
func (S *SFinalReportExcelService) ShowList(c *gin.Context) {
|
||||
keyWord := c.Query("key_word")
|
||||
offset, limit, err := utils.PaginationLimitAndPage(c)
|
||||
if err != nil {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
if finalReportExcel, total, err := test_data.ShowListFinalReportExcel(offset, limit, keyWord); err != nil {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
} else {
|
||||
response.OkWithData(gin.H{"final_report_excel": finalReportExcel, "total": total}, c)
|
||||
}
|
||||
}
|
||||
|
||||
// @Tags 数据分析平台
|
||||
// @Summary 更新结批报告字段信息
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param date body request.UpdateFinalReportExcel true "更新结批报告字段信息"
|
||||
// @Success 200 {string} string "{"success": true, "data": {}, "msg": "操作成功"}"
|
||||
// @Router /testData/finalReport/excel [put]
|
||||
func (S *SFinalReportExcelService) Update(c *gin.Context) {
|
||||
r := request.UpdateFinalReportExcel{}
|
||||
_ = c.ShouldBind(&r)
|
||||
if msg, ok := utils.ValidateInfo2CN(r); !ok {
|
||||
response.FailWithMessage(msg, c)
|
||||
return
|
||||
}
|
||||
if err := test_data.UpdateFinalReportExcel(&r); err != nil {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
} else {
|
||||
response.Ok(c)
|
||||
}
|
||||
}
|
||||
|
||||
// @Tags 数据分析平台
|
||||
// @Summary 删除结批报告字段信息
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param date body request.DeleteFinalReportExcel true "删除结批报告字段信息"
|
||||
// @Success 200 {string} string "{"success": true, "data": {}, "msg": "操作成功"}"
|
||||
// @Router /testData/finalReport/excel [delete]
|
||||
func (S *SFinalReportExcelService) Delete(c *gin.Context) {
|
||||
r := request.DeleteFinalReportExcel{}
|
||||
_ = c.ShouldBind(&r)
|
||||
if msg, ok := utils.ValidateInfo2CN(r); !ok {
|
||||
response.FailWithMessage(msg, c)
|
||||
return
|
||||
}
|
||||
if err := test_data.DeleteFinalReportExcel(&r); err != nil {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
} else {
|
||||
response.Ok(c)
|
||||
}
|
||||
}
|
79
api/test.data/warning.go
Normal file
79
api/test.data/warning.go
Normal file
@ -0,0 +1,79 @@
|
||||
package test_data
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"testData/model"
|
||||
"testData/model/response"
|
||||
test_data "testData/repository/test.data"
|
||||
"testData/utils"
|
||||
)
|
||||
|
||||
type IWarningInterface struct {
|
||||
}
|
||||
|
||||
type SWarningService struct {
|
||||
}
|
||||
|
||||
func InitWarningService() *SWarningService {
|
||||
return &SWarningService{}
|
||||
}
|
||||
|
||||
// @Tags 数据分析平台
|
||||
// @Summary 调整报警设置信息
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body model.Warning{} true "调整报警设置信息"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"操作成功"}"
|
||||
// @Router /testData/warning [post]
|
||||
func (S *SWarningService) Update(c *gin.Context) {
|
||||
r := model.Warning{}
|
||||
_ = c.ShouldBind(&r)
|
||||
if msg, ok := utils.ValidateInfo2CN(r); !ok {
|
||||
response.FailWithMessage(msg, c)
|
||||
return
|
||||
}
|
||||
response.OkWithData(test_data.UpdateWarning(&r), c)
|
||||
}
|
||||
|
||||
// @Tags 数据分析平台
|
||||
// @Summary 分页查询报警设置信息
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Param page query int true "页数"
|
||||
// @Param pageSize query int true "每页显示数量"
|
||||
// @Param key_word query string false "关键词"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"操作成功"}"
|
||||
// @Router /testData/warning [get]
|
||||
func (S *SWarningService) ShowList(c *gin.Context) {
|
||||
offset, limit, err := utils.PaginationLimitAndPage(c)
|
||||
if err != nil {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
keyWord := c.Query("key_word")
|
||||
warning, total, err := test_data.ShowListWarning(offset, limit, keyWord)
|
||||
if err != nil {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
response.OkWithData(gin.H{"warning": warning, "total": total}, c)
|
||||
}
|
||||
|
||||
// @Tags 数据分析平台
|
||||
// @Summary 删除报警设置信息
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body model.Warning{} true "删除报警设置信息"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"操作成功"}"
|
||||
// @Router /testData/warning [delete]
|
||||
func (S *SWarningService) Delete(c *gin.Context) {
|
||||
r := model.Warning{}
|
||||
_ = c.ShouldBind(&r)
|
||||
if msg, ok := utils.ValidateInfo2CN(r); !ok {
|
||||
response.FailWithMessage(msg, c)
|
||||
return
|
||||
}
|
||||
response.OkWithData(test_data.DeleteWarning(&r), c)
|
||||
}
|
719
docs/docs.go
719
docs/docs.go
@ -99,6 +99,163 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/testData/finalReport/excel": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "分页查询结批报告字段信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页数",
|
||||
"name": "page",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "每页显示数量",
|
||||
"name": "pageSize",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "关键词",
|
||||
"name": "key_word",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\": true, \"data\": {}, \"msg\": \"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "更新结批报告字段信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "更新结批报告字段信息",
|
||||
"name": "date",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.UpdateFinalReportExcel"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\": true, \"data\": {}, \"msg\": \"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "添加结批报告字段信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "添加结批报告字段信息",
|
||||
"name": "date",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.CreateFinalReportExcel"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\": true, \"data\": {}, \"msg\": \"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "删除结批报告字段信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "删除结批报告字段信息",
|
||||
"name": "date",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.DeleteFinalReportExcel"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\": true, \"data\": {}, \"msg\": \"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/testData/ftHistogram/export": {
|
||||
"post": {
|
||||
"security": [
|
||||
@ -650,7 +807,7 @@ var doc = `{
|
||||
"summary": "导出散点图",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "CP Map图",
|
||||
"description": "导出散点图",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
@ -801,9 +958,376 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/testData/warning": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "分页查询报警设置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页数",
|
||||
"name": "page",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "每页显示数量",
|
||||
"name": "pageSize",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "关键词",
|
||||
"name": "key_word",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "调整报警设置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "调整报警设置信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/model.Warning"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "删除报警设置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "删除报警设置信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/model.Warning"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"model.BinControl": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bin": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin_fail_limit_h": {
|
||||
"description": "关键Bin失效上限",
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.HistogramSelection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"selection": {
|
||||
"description": "参数",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.PassProbabilityDiff": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pass_probability_diff": {
|
||||
"description": "良率差异设置(报表良率)",
|
||||
"type": "string"
|
||||
},
|
||||
"pass_probability_wave": {
|
||||
"description": "良率波动设置(报表良率)",
|
||||
"type": "string"
|
||||
},
|
||||
"site_pass_probability_diff": {
|
||||
"description": "各SITE良率差异设置(一次通过率)",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.ProductionControl": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"factory": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pass_quantity_diff_h": {
|
||||
"description": "良品数量差异上限",
|
||||
"type": "string"
|
||||
},
|
||||
"pass_quantity_diff_l": {
|
||||
"description": "良品数量差异下限",
|
||||
"type": "string"
|
||||
},
|
||||
"test_quantity_diff_h": {
|
||||
"description": "测试数量差异上限",
|
||||
"type": "string"
|
||||
},
|
||||
"test_quantity_diff_l": {
|
||||
"description": "测试数量差异下限",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.ScatterSelection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"x_selection": {
|
||||
"description": "参数-X",
|
||||
"type": "string"
|
||||
},
|
||||
"y_selection": {
|
||||
"description": "参数-Y",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.SelectionDiffControl": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"site_diff": {
|
||||
"description": "SITE间差异(均值最大值-均值最小值)",
|
||||
"type": "string"
|
||||
},
|
||||
"sub_batch_diff": {
|
||||
"description": "批次间差异(均值最大值-均值最小值)",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.StackingMaterialsWarning": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"diff": {
|
||||
"description": "差异",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"quantity": {
|
||||
"description": "数量",
|
||||
"type": "string"
|
||||
},
|
||||
"selection": {
|
||||
"description": "参数",
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"description": "单位",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.Warning": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"average_pass_probability": {
|
||||
"description": "平均良率",
|
||||
"type": "string"
|
||||
},
|
||||
"bin_control": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.BinControl"
|
||||
}
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_pass_probability_limit_l": {
|
||||
"description": "一次通过率下限",
|
||||
"type": "string"
|
||||
},
|
||||
"histogram_selection": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.HistogramSelection"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pass_probability_diff": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.PassProbabilityDiff"
|
||||
}
|
||||
},
|
||||
"pass_probability_limit_l": {
|
||||
"description": "良率下限",
|
||||
"type": "string"
|
||||
},
|
||||
"product": {
|
||||
"description": "成品型号",
|
||||
"type": "string"
|
||||
},
|
||||
"production_control": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.ProductionControl"
|
||||
}
|
||||
},
|
||||
"return_probability_limit_h": {
|
||||
"description": "回收率上限",
|
||||
"type": "string"
|
||||
},
|
||||
"scatter_selection": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.ScatterSelection"
|
||||
}
|
||||
},
|
||||
"selection_diff_control": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.SelectionDiffControl"
|
||||
}
|
||||
},
|
||||
"stacking_materials_warning": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.StackingMaterialsWarning"
|
||||
}
|
||||
},
|
||||
"step": {
|
||||
"description": "工序",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.ABList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -995,6 +1519,105 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.CreateFinalReportExcel": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bent_stitch": {
|
||||
"description": "弯脚",
|
||||
"type": "string"
|
||||
},
|
||||
"bin1": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin10": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin2": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin3": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin4": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin5": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin6": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin7": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin8": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin9": {
|
||||
"type": "string"
|
||||
},
|
||||
"factory": {
|
||||
"description": "测试厂",
|
||||
"type": "string"
|
||||
},
|
||||
"final_pass_probability": {
|
||||
"description": "结批良率",
|
||||
"type": "string"
|
||||
},
|
||||
"final_pass_quantity": {
|
||||
"description": "结批良品数量",
|
||||
"type": "string"
|
||||
},
|
||||
"final_test_quantity": {
|
||||
"description": "结批测试数量",
|
||||
"type": "string"
|
||||
},
|
||||
"lot": {
|
||||
"description": "晶圆批次",
|
||||
"type": "string"
|
||||
},
|
||||
"order_date": {
|
||||
"description": "下单日期",
|
||||
"type": "string"
|
||||
},
|
||||
"other": {
|
||||
"description": "少数",
|
||||
"type": "string"
|
||||
},
|
||||
"outlook_fail": {
|
||||
"description": "外观不良",
|
||||
"type": "string"
|
||||
},
|
||||
"pbi": {
|
||||
"description": "PBI",
|
||||
"type": "string"
|
||||
},
|
||||
"product": {
|
||||
"description": "成品型号",
|
||||
"type": "string"
|
||||
},
|
||||
"scrapped": {
|
||||
"description": "报废",
|
||||
"type": "string"
|
||||
},
|
||||
"seal": {
|
||||
"description": "丝印",
|
||||
"type": "string"
|
||||
},
|
||||
"test_program": {
|
||||
"description": "测试程序",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.DeleteFinalReportExcel": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.FTList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -1513,6 +2136,100 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.UpdateFinalReportExcel": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bent_stitch": {
|
||||
"description": "弯脚",
|
||||
"type": "string"
|
||||
},
|
||||
"bin1": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin10": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin2": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin3": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin4": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin5": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin6": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin7": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin8": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin9": {
|
||||
"type": "string"
|
||||
},
|
||||
"factory": {
|
||||
"description": "测试厂",
|
||||
"type": "string"
|
||||
},
|
||||
"final_pass_probability": {
|
||||
"description": "结批良率",
|
||||
"type": "string"
|
||||
},
|
||||
"final_pass_quantity": {
|
||||
"description": "结批良品数量",
|
||||
"type": "string"
|
||||
},
|
||||
"final_test_quantity": {
|
||||
"description": "结批测试数量",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"lot": {
|
||||
"description": "晶圆批次",
|
||||
"type": "string"
|
||||
},
|
||||
"order_date": {
|
||||
"description": "下单日期",
|
||||
"type": "string"
|
||||
},
|
||||
"other": {
|
||||
"description": "少数",
|
||||
"type": "string"
|
||||
},
|
||||
"outlook_fail": {
|
||||
"description": "外观不良",
|
||||
"type": "string"
|
||||
},
|
||||
"pbi": {
|
||||
"description": "PBI",
|
||||
"type": "string"
|
||||
},
|
||||
"product": {
|
||||
"description": "成品型号",
|
||||
"type": "string"
|
||||
},
|
||||
"scrapped": {
|
||||
"description": "报废",
|
||||
"type": "string"
|
||||
},
|
||||
"seal": {
|
||||
"description": "丝印",
|
||||
"type": "string"
|
||||
},
|
||||
"test_program": {
|
||||
"description": "测试程序",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.WaferList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -80,6 +80,163 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/testData/finalReport/excel": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "分页查询结批报告字段信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页数",
|
||||
"name": "page",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "每页显示数量",
|
||||
"name": "pageSize",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "关键词",
|
||||
"name": "key_word",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\": true, \"data\": {}, \"msg\": \"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "更新结批报告字段信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "更新结批报告字段信息",
|
||||
"name": "date",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.UpdateFinalReportExcel"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\": true, \"data\": {}, \"msg\": \"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "添加结批报告字段信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "添加结批报告字段信息",
|
||||
"name": "date",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.CreateFinalReportExcel"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\": true, \"data\": {}, \"msg\": \"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "删除结批报告字段信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "删除结批报告字段信息",
|
||||
"name": "date",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.DeleteFinalReportExcel"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\": true, \"data\": {}, \"msg\": \"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/testData/ftHistogram/export": {
|
||||
"post": {
|
||||
"security": [
|
||||
@ -631,7 +788,7 @@
|
||||
"summary": "导出散点图",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "CP Map图",
|
||||
"description": "导出散点图",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
@ -782,9 +939,376 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/testData/warning": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "分页查询报警设置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页数",
|
||||
"name": "page",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "每页显示数量",
|
||||
"name": "pageSize",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "关键词",
|
||||
"name": "key_word",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "调整报警设置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "调整报警设置信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/model.Warning"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"数据分析平台"
|
||||
],
|
||||
"summary": "删除报警设置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "删除报警设置信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/model.Warning"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"操作成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"model.BinControl": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bin": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin_fail_limit_h": {
|
||||
"description": "关键Bin失效上限",
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.HistogramSelection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"selection": {
|
||||
"description": "参数",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.PassProbabilityDiff": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pass_probability_diff": {
|
||||
"description": "良率差异设置(报表良率)",
|
||||
"type": "string"
|
||||
},
|
||||
"pass_probability_wave": {
|
||||
"description": "良率波动设置(报表良率)",
|
||||
"type": "string"
|
||||
},
|
||||
"site_pass_probability_diff": {
|
||||
"description": "各SITE良率差异设置(一次通过率)",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.ProductionControl": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"factory": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pass_quantity_diff_h": {
|
||||
"description": "良品数量差异上限",
|
||||
"type": "string"
|
||||
},
|
||||
"pass_quantity_diff_l": {
|
||||
"description": "良品数量差异下限",
|
||||
"type": "string"
|
||||
},
|
||||
"test_quantity_diff_h": {
|
||||
"description": "测试数量差异上限",
|
||||
"type": "string"
|
||||
},
|
||||
"test_quantity_diff_l": {
|
||||
"description": "测试数量差异下限",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.ScatterSelection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"x_selection": {
|
||||
"description": "参数-X",
|
||||
"type": "string"
|
||||
},
|
||||
"y_selection": {
|
||||
"description": "参数-Y",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.SelectionDiffControl": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"site_diff": {
|
||||
"description": "SITE间差异(均值最大值-均值最小值)",
|
||||
"type": "string"
|
||||
},
|
||||
"sub_batch_diff": {
|
||||
"description": "批次间差异(均值最大值-均值最小值)",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.StackingMaterialsWarning": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"diff": {
|
||||
"description": "差异",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"quantity": {
|
||||
"description": "数量",
|
||||
"type": "string"
|
||||
},
|
||||
"selection": {
|
||||
"description": "参数",
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"description": "单位",
|
||||
"type": "string"
|
||||
},
|
||||
"warning_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.Warning": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"average_pass_probability": {
|
||||
"description": "平均良率",
|
||||
"type": "string"
|
||||
},
|
||||
"bin_control": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.BinControl"
|
||||
}
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_pass_probability_limit_l": {
|
||||
"description": "一次通过率下限",
|
||||
"type": "string"
|
||||
},
|
||||
"histogram_selection": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.HistogramSelection"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pass_probability_diff": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.PassProbabilityDiff"
|
||||
}
|
||||
},
|
||||
"pass_probability_limit_l": {
|
||||
"description": "良率下限",
|
||||
"type": "string"
|
||||
},
|
||||
"product": {
|
||||
"description": "成品型号",
|
||||
"type": "string"
|
||||
},
|
||||
"production_control": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.ProductionControl"
|
||||
}
|
||||
},
|
||||
"return_probability_limit_h": {
|
||||
"description": "回收率上限",
|
||||
"type": "string"
|
||||
},
|
||||
"scatter_selection": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.ScatterSelection"
|
||||
}
|
||||
},
|
||||
"selection_diff_control": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.SelectionDiffControl"
|
||||
}
|
||||
},
|
||||
"stacking_materials_warning": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.StackingMaterialsWarning"
|
||||
}
|
||||
},
|
||||
"step": {
|
||||
"description": "工序",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.ABList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -976,6 +1500,105 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.CreateFinalReportExcel": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bent_stitch": {
|
||||
"description": "弯脚",
|
||||
"type": "string"
|
||||
},
|
||||
"bin1": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin10": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin2": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin3": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin4": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin5": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin6": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin7": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin8": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin9": {
|
||||
"type": "string"
|
||||
},
|
||||
"factory": {
|
||||
"description": "测试厂",
|
||||
"type": "string"
|
||||
},
|
||||
"final_pass_probability": {
|
||||
"description": "结批良率",
|
||||
"type": "string"
|
||||
},
|
||||
"final_pass_quantity": {
|
||||
"description": "结批良品数量",
|
||||
"type": "string"
|
||||
},
|
||||
"final_test_quantity": {
|
||||
"description": "结批测试数量",
|
||||
"type": "string"
|
||||
},
|
||||
"lot": {
|
||||
"description": "晶圆批次",
|
||||
"type": "string"
|
||||
},
|
||||
"order_date": {
|
||||
"description": "下单日期",
|
||||
"type": "string"
|
||||
},
|
||||
"other": {
|
||||
"description": "少数",
|
||||
"type": "string"
|
||||
},
|
||||
"outlook_fail": {
|
||||
"description": "外观不良",
|
||||
"type": "string"
|
||||
},
|
||||
"pbi": {
|
||||
"description": "PBI",
|
||||
"type": "string"
|
||||
},
|
||||
"product": {
|
||||
"description": "成品型号",
|
||||
"type": "string"
|
||||
},
|
||||
"scrapped": {
|
||||
"description": "报废",
|
||||
"type": "string"
|
||||
},
|
||||
"seal": {
|
||||
"description": "丝印",
|
||||
"type": "string"
|
||||
},
|
||||
"test_program": {
|
||||
"description": "测试程序",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.DeleteFinalReportExcel": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.FTList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -1494,6 +2117,100 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.UpdateFinalReportExcel": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bent_stitch": {
|
||||
"description": "弯脚",
|
||||
"type": "string"
|
||||
},
|
||||
"bin1": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin10": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin2": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin3": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin4": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin5": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin6": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin7": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin8": {
|
||||
"type": "string"
|
||||
},
|
||||
"bin9": {
|
||||
"type": "string"
|
||||
},
|
||||
"factory": {
|
||||
"description": "测试厂",
|
||||
"type": "string"
|
||||
},
|
||||
"final_pass_probability": {
|
||||
"description": "结批良率",
|
||||
"type": "string"
|
||||
},
|
||||
"final_pass_quantity": {
|
||||
"description": "结批良品数量",
|
||||
"type": "string"
|
||||
},
|
||||
"final_test_quantity": {
|
||||
"description": "结批测试数量",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"lot": {
|
||||
"description": "晶圆批次",
|
||||
"type": "string"
|
||||
},
|
||||
"order_date": {
|
||||
"description": "下单日期",
|
||||
"type": "string"
|
||||
},
|
||||
"other": {
|
||||
"description": "少数",
|
||||
"type": "string"
|
||||
},
|
||||
"outlook_fail": {
|
||||
"description": "外观不良",
|
||||
"type": "string"
|
||||
},
|
||||
"pbi": {
|
||||
"description": "PBI",
|
||||
"type": "string"
|
||||
},
|
||||
"product": {
|
||||
"description": "成品型号",
|
||||
"type": "string"
|
||||
},
|
||||
"scrapped": {
|
||||
"description": "报废",
|
||||
"type": "string"
|
||||
},
|
||||
"seal": {
|
||||
"description": "丝印",
|
||||
"type": "string"
|
||||
},
|
||||
"test_program": {
|
||||
"description": "测试程序",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.WaferList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -1,4 +1,175 @@
|
||||
definitions:
|
||||
model.BinControl:
|
||||
properties:
|
||||
bin:
|
||||
type: string
|
||||
bin_fail_limit_h:
|
||||
description: 关键Bin失效上限
|
||||
type: string
|
||||
created_at:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
warning_id:
|
||||
type: integer
|
||||
type: object
|
||||
model.HistogramSelection:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
selection:
|
||||
description: 参数
|
||||
type: string
|
||||
warning_id:
|
||||
type: integer
|
||||
type: object
|
||||
model.PassProbabilityDiff:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
pass_probability_diff:
|
||||
description: 良率差异设置(报表良率)
|
||||
type: string
|
||||
pass_probability_wave:
|
||||
description: 良率波动设置(报表良率)
|
||||
type: string
|
||||
site_pass_probability_diff:
|
||||
description: 各SITE良率差异设置(一次通过率)
|
||||
type: string
|
||||
warning_id:
|
||||
type: integer
|
||||
type: object
|
||||
model.ProductionControl:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
factory:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
pass_quantity_diff_h:
|
||||
description: 良品数量差异上限
|
||||
type: string
|
||||
pass_quantity_diff_l:
|
||||
description: 良品数量差异下限
|
||||
type: string
|
||||
test_quantity_diff_h:
|
||||
description: 测试数量差异上限
|
||||
type: string
|
||||
test_quantity_diff_l:
|
||||
description: 测试数量差异下限
|
||||
type: string
|
||||
warning_id:
|
||||
type: integer
|
||||
type: object
|
||||
model.ScatterSelection:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
warning_id:
|
||||
type: integer
|
||||
x_selection:
|
||||
description: 参数-X
|
||||
type: string
|
||||
y_selection:
|
||||
description: 参数-Y
|
||||
type: string
|
||||
type: object
|
||||
model.SelectionDiffControl:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
site_diff:
|
||||
description: SITE间差异(均值最大值-均值最小值)
|
||||
type: string
|
||||
sub_batch_diff:
|
||||
description: 批次间差异(均值最大值-均值最小值)
|
||||
type: string
|
||||
warning_id:
|
||||
type: integer
|
||||
type: object
|
||||
model.StackingMaterialsWarning:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
diff:
|
||||
description: 差异
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
quantity:
|
||||
description: 数量
|
||||
type: string
|
||||
selection:
|
||||
description: 参数
|
||||
type: string
|
||||
unit:
|
||||
description: 单位
|
||||
type: string
|
||||
warning_id:
|
||||
type: integer
|
||||
type: object
|
||||
model.Warning:
|
||||
properties:
|
||||
average_pass_probability:
|
||||
description: 平均良率
|
||||
type: string
|
||||
bin_control:
|
||||
items:
|
||||
$ref: '#/definitions/model.BinControl'
|
||||
type: array
|
||||
created_at:
|
||||
type: string
|
||||
first_pass_probability_limit_l:
|
||||
description: 一次通过率下限
|
||||
type: string
|
||||
histogram_selection:
|
||||
items:
|
||||
$ref: '#/definitions/model.HistogramSelection'
|
||||
type: array
|
||||
id:
|
||||
type: integer
|
||||
pass_probability_diff:
|
||||
items:
|
||||
$ref: '#/definitions/model.PassProbabilityDiff'
|
||||
type: array
|
||||
pass_probability_limit_l:
|
||||
description: 良率下限
|
||||
type: string
|
||||
product:
|
||||
description: 成品型号
|
||||
type: string
|
||||
production_control:
|
||||
items:
|
||||
$ref: '#/definitions/model.ProductionControl'
|
||||
type: array
|
||||
return_probability_limit_h:
|
||||
description: 回收率上限
|
||||
type: string
|
||||
scatter_selection:
|
||||
items:
|
||||
$ref: '#/definitions/model.ScatterSelection'
|
||||
type: array
|
||||
selection_diff_control:
|
||||
items:
|
||||
$ref: '#/definitions/model.SelectionDiffControl'
|
||||
type: array
|
||||
stacking_materials_warning:
|
||||
items:
|
||||
$ref: '#/definitions/model.StackingMaterialsWarning'
|
||||
type: array
|
||||
step:
|
||||
description: 工序
|
||||
type: string
|
||||
type: object
|
||||
request.ABList:
|
||||
properties:
|
||||
factory:
|
||||
@ -135,6 +306,76 @@ definitions:
|
||||
description: Bin名称
|
||||
type: string
|
||||
type: object
|
||||
request.CreateFinalReportExcel:
|
||||
properties:
|
||||
bent_stitch:
|
||||
description: 弯脚
|
||||
type: string
|
||||
bin1:
|
||||
type: string
|
||||
bin2:
|
||||
type: string
|
||||
bin3:
|
||||
type: string
|
||||
bin4:
|
||||
type: string
|
||||
bin5:
|
||||
type: string
|
||||
bin6:
|
||||
type: string
|
||||
bin7:
|
||||
type: string
|
||||
bin8:
|
||||
type: string
|
||||
bin9:
|
||||
type: string
|
||||
bin10:
|
||||
type: string
|
||||
factory:
|
||||
description: 测试厂
|
||||
type: string
|
||||
final_pass_probability:
|
||||
description: 结批良率
|
||||
type: string
|
||||
final_pass_quantity:
|
||||
description: 结批良品数量
|
||||
type: string
|
||||
final_test_quantity:
|
||||
description: 结批测试数量
|
||||
type: string
|
||||
lot:
|
||||
description: 晶圆批次
|
||||
type: string
|
||||
order_date:
|
||||
description: 下单日期
|
||||
type: string
|
||||
other:
|
||||
description: 少数
|
||||
type: string
|
||||
outlook_fail:
|
||||
description: 外观不良
|
||||
type: string
|
||||
pbi:
|
||||
description: PBI
|
||||
type: string
|
||||
product:
|
||||
description: 成品型号
|
||||
type: string
|
||||
scrapped:
|
||||
description: 报废
|
||||
type: string
|
||||
seal:
|
||||
description: 丝印
|
||||
type: string
|
||||
test_program:
|
||||
description: 测试程序
|
||||
type: string
|
||||
type: object
|
||||
request.DeleteFinalReportExcel:
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
type: object
|
||||
request.FTList:
|
||||
properties:
|
||||
factory:
|
||||
@ -501,6 +742,73 @@ definitions:
|
||||
wafer_id:
|
||||
type: string
|
||||
type: object
|
||||
request.UpdateFinalReportExcel:
|
||||
properties:
|
||||
bent_stitch:
|
||||
description: 弯脚
|
||||
type: string
|
||||
bin1:
|
||||
type: string
|
||||
bin2:
|
||||
type: string
|
||||
bin3:
|
||||
type: string
|
||||
bin4:
|
||||
type: string
|
||||
bin5:
|
||||
type: string
|
||||
bin6:
|
||||
type: string
|
||||
bin7:
|
||||
type: string
|
||||
bin8:
|
||||
type: string
|
||||
bin9:
|
||||
type: string
|
||||
bin10:
|
||||
type: string
|
||||
factory:
|
||||
description: 测试厂
|
||||
type: string
|
||||
final_pass_probability:
|
||||
description: 结批良率
|
||||
type: string
|
||||
final_pass_quantity:
|
||||
description: 结批良品数量
|
||||
type: string
|
||||
final_test_quantity:
|
||||
description: 结批测试数量
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
lot:
|
||||
description: 晶圆批次
|
||||
type: string
|
||||
order_date:
|
||||
description: 下单日期
|
||||
type: string
|
||||
other:
|
||||
description: 少数
|
||||
type: string
|
||||
outlook_fail:
|
||||
description: 外观不良
|
||||
type: string
|
||||
pbi:
|
||||
description: PBI
|
||||
type: string
|
||||
product:
|
||||
description: 成品型号
|
||||
type: string
|
||||
scrapped:
|
||||
description: 报废
|
||||
type: string
|
||||
seal:
|
||||
description: 丝印
|
||||
type: string
|
||||
test_program:
|
||||
description: 测试程序
|
||||
type: string
|
||||
type: object
|
||||
request.WaferList:
|
||||
properties:
|
||||
factory:
|
||||
@ -590,6 +898,103 @@ paths:
|
||||
summary: 导出CP Map图
|
||||
tags:
|
||||
- 数据分析平台
|
||||
/testData/finalReport/excel:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 删除结批报告字段信息
|
||||
in: body
|
||||
name: date
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/request.DeleteFinalReportExcel'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success": true, "data": {}, "msg": "操作成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 删除结批报告字段信息
|
||||
tags:
|
||||
- 数据分析平台
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 页数
|
||||
in: query
|
||||
name: page
|
||||
required: true
|
||||
type: integer
|
||||
- description: 每页显示数量
|
||||
in: query
|
||||
name: pageSize
|
||||
required: true
|
||||
type: integer
|
||||
- description: 关键词
|
||||
in: query
|
||||
name: key_word
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success": true, "data": {}, "msg": "操作成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 分页查询结批报告字段信息
|
||||
tags:
|
||||
- 数据分析平台
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 添加结批报告字段信息
|
||||
in: body
|
||||
name: date
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/request.CreateFinalReportExcel'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success": true, "data": {}, "msg": "操作成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 添加结批报告字段信息
|
||||
tags:
|
||||
- 数据分析平台
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 更新结批报告字段信息
|
||||
in: body
|
||||
name: date
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/request.UpdateFinalReportExcel'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success": true, "data": {}, "msg": "操作成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 更新结批报告字段信息
|
||||
tags:
|
||||
- 数据分析平台
|
||||
/testData/ftHistogram/export:
|
||||
post:
|
||||
consumes:
|
||||
@ -917,7 +1322,7 @@ paths:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: CP Map图
|
||||
- description: 导出散点图
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
@ -1018,4 +1423,77 @@ paths:
|
||||
summary: 上传没录入文件
|
||||
tags:
|
||||
- 数据分析平台
|
||||
/testData/warning:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 删除报警设置信息
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/model.Warning'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success":true,"data":{},"msg":"操作成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 删除报警设置信息
|
||||
tags:
|
||||
- 数据分析平台
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 页数
|
||||
in: query
|
||||
name: page
|
||||
required: true
|
||||
type: integer
|
||||
- description: 每页显示数量
|
||||
in: query
|
||||
name: pageSize
|
||||
required: true
|
||||
type: integer
|
||||
- description: 关键词
|
||||
in: query
|
||||
name: key_word
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success":true,"data":{},"msg":"操作成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 分页查询报警设置信息
|
||||
tags:
|
||||
- 数据分析平台
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 调整报警设置信息
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/model.Warning'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success":true,"data":{},"msg":"操作成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 调整报警设置信息
|
||||
tags:
|
||||
- 数据分析平台
|
||||
swagger: "2.0"
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
go.mod
5
go.mod
@ -1,11 +1,14 @@
|
||||
module testData
|
||||
|
||||
go 1.19
|
||||
go 1.21
|
||||
|
||||
toolchain go1.22.5
|
||||
|
||||
require github.com/natefinch/lumberjack v2.0.0+incompatible
|
||||
|
||||
require (
|
||||
gitee.com/golang-module/carbon/v2 v2.3.11 // indirect
|
||||
github.com/BurntSushi/toml v1.4.0 // indirect
|
||||
github.com/KyleBanks/depth v1.2.1 // indirect
|
||||
github.com/PuerkitoBio/purell v1.2.1 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
|
2
go.sum
2
go.sum
@ -12,6 +12,8 @@ github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.0/go.mod h1:
|
||||
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0/go.mod h1:cw4zVQgBby0Z5f2v0itn6se2dDP17nTjbZFXW5uPyHA=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
|
||||
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
|
||||
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
||||
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
||||
github.com/PuerkitoBio/purell v1.2.1 h1:QsZ4TjvwiMpat6gBCBxEQI0rcS9ehtkKtSpiUnd9N28=
|
||||
|
@ -27,6 +27,8 @@ func InitRouter() *gin.Engine {
|
||||
router.InitChartRouter(testData)
|
||||
router.InitReportListRouter(testData)
|
||||
router.InitReportChartRouter(testData)
|
||||
router.InitWarningRouter(testData)
|
||||
router.InitFinalReportExcelRouter(testData)
|
||||
}
|
||||
testDataUpload := r.Group("testData")
|
||||
testDataUploadService := testdata.InitUpload()
|
||||
|
@ -1019,3 +1019,41 @@
|
||||
2024-07-12 09:50:28 INFO | 192.168.0.219 | 200 | 3.776567ms | GET | 未登录 | /files/2024-07/%E7%9B%B4%E6%96%B9%E5%9B%BE/MP5016-5EC0_S3S592_%E7%9B%B4%E6%96%B9%E5%9B%BE_2024-07-12_095027.xlsx
|
||||
2024-07-12 09:51:57 INFO | 192.168.0.219 | 200 | 4.624707668s | POST | 未登录 | /testData/ftHistogram/export
|
||||
2024-07-12 09:51:58 INFO | 192.168.0.219 | 200 | 3.251175ms | GET | 未登录 | /files/2024-07/%E7%9B%B4%E6%96%B9%E5%9B%BE/MP5016-5EC0_S3S592_%E7%9B%B4%E6%96%B9%E5%9B%BE_2024-07-12_095157.xlsx
|
||||
2024-07-19 16:29:46 INFO | 192.168.0.219 | 200 | 2.1057ms | GET | 未登录 | /docs/index.html
|
||||
2024-07-19 16:29:46 INFO | 192.168.0.219 | 200 | 1.2813ms | GET | 未登录 | /docs/swagger-ui.css
|
||||
2024-07-19 16:29:46 INFO | 192.168.0.219 | 200 | 0s | GET | 未登录 | /docs/swagger-ui-standalone-preset.js
|
||||
2024-07-19 16:29:46 INFO | 192.168.0.219 | 200 | 552µs | GET | 未登录 | /docs/swagger-ui-bundle.js
|
||||
2024-07-19 16:29:46 INFO | 192.168.0.219 | 200 | 366.3µs | GET | 未登录 | /docs/doc.json
|
||||
2024-07-19 16:29:46 INFO | 192.168.0.219 | 200 | 758.7µs | GET | 未登录 | /docs/favicon-32x32.png
|
||||
2024-07-19 16:29:49 INFO | 192.168.0.248 | 200 | 0s | GET | 未登录 | /docs/index.html
|
||||
2024-07-19 16:29:49 INFO | 192.168.0.248 | 200 | 4.7764ms | GET | 未登录 | /docs/swagger-ui-standalone-preset.js
|
||||
2024-07-19 16:29:49 INFO | 192.168.0.248 | 200 | 24.634ms | GET | 未登录 | /docs/swagger-ui.css
|
||||
2024-07-19 16:29:49 INFO | 192.168.0.248 | 200 | 36.6566ms | GET | 未登录 | /docs/swagger-ui-bundle.js
|
||||
2024-07-19 16:29:50 INFO | 192.168.0.248 | 200 | 997.2µs | GET | 未登录 | /docs/doc.json
|
||||
2024-07-19 16:29:50 INFO | 192.168.0.248 | 200 | 623.7µs | GET | 未登录 | /docs/favicon-32x32.png
|
||||
2024-07-19 16:30:21 INFO | 192.168.0.219 | 200 | 0s | GET | 未登录 | /docs/index.html
|
||||
2024-07-19 16:30:21 INFO | 192.168.0.219 | 200 | 992.4µs | GET | 未登录 | /docs/swagger-ui.css
|
||||
2024-07-19 16:30:21 INFO | 192.168.0.219 | 200 | 1.6283ms | GET | 未登录 | /docs/swagger-ui-bundle.js
|
||||
2024-07-19 16:30:21 INFO | 192.168.0.219 | 200 | 533.6µs | GET | 未登录 | /docs/swagger-ui-standalone-preset.js
|
||||
2024-07-19 16:30:21 INFO | 192.168.0.219 | 200 | 1.0153ms | GET | 未登录 | /docs/doc.json
|
||||
2024-07-19 16:30:21 INFO | 192.168.0.219 | 200 | 0s | GET | 未登录 | /docs/favicon-32x32.png
|
||||
2024-07-22 17:25:04 INFO | 192.168.0.248 | 200 | 720.6µs | GET | 未登录 | /docs/index.html
|
||||
2024-07-22 17:25:04 INFO | 192.168.0.248 | 200 | 18.2136ms | GET | 未登录 | /docs/swagger-ui-standalone-preset.js
|
||||
2024-07-22 17:25:04 INFO | 192.168.0.248 | 200 | 24.4186ms | GET | 未登录 | /docs/swagger-ui.css
|
||||
2024-07-22 17:25:04 INFO | 192.168.0.248 | 200 | 40.4849ms | GET | 未登录 | /docs/swagger-ui-bundle.js
|
||||
2024-07-22 17:25:04 INFO | 192.168.0.248 | 200 | 948.2µs | GET | 未登录 | /docs/doc.json
|
||||
2024-07-22 19:11:29 INFO | 192.168.0.248 | 200 | 910.6µs | GET | 未登录 | /docs/index.html
|
||||
2024-07-22 19:11:29 INFO | 192.168.0.248 | 200 | 2.0663ms | GET | 未登录 | /docs/swagger-ui.css
|
||||
2024-07-22 19:11:29 INFO | 192.168.0.248 | 200 | 4.9684ms | GET | 未登录 | /docs/swagger-ui-bundle.js
|
||||
2024-07-22 19:11:29 INFO | 192.168.0.248 | 200 | 9.1993ms | GET | 未登录 | /docs/swagger-ui-standalone-preset.js
|
||||
2024-07-22 19:11:30 INFO | 192.168.0.248 | 200 | 330.8µs | GET | 未登录 | /docs/doc.json
|
||||
2024-07-24 09:52:59 INFO | 192.168.0.248 | 304 | 181.9µs | GET | 未登录 | /docs/swagger-ui.css
|
||||
2024-07-24 09:52:59 INFO | 192.168.0.248 | 304 | 0s | GET | 未登录 | /docs/swagger-ui-bundle.js
|
||||
2024-07-24 09:52:59 INFO | 192.168.0.248 | 304 | 0s | GET | 未登录 | /docs/swagger-ui-standalone-preset.js
|
||||
2024-07-24 09:52:59 INFO | 192.168.0.248 | 200 | 764.3µs | GET | 未登录 | /docs/doc.json
|
||||
2024-07-24 17:36:22 INFO | 192.168.0.219 | 200 | 0s | GET | 未登录 | /docs/index.html
|
||||
2024-07-24 17:36:22 INFO | 192.168.0.219 | 200 | 208µs | GET | 未登录 | /docs/swagger-ui.css
|
||||
2024-07-24 17:36:22 INFO | 192.168.0.219 | 200 | 1.0396ms | GET | 未登录 | /docs/swagger-ui-bundle.js
|
||||
2024-07-24 17:36:22 INFO | 192.168.0.219 | 200 | 0s | GET | 未登录 | /docs/swagger-ui-standalone-preset.js
|
||||
2024-07-24 17:36:22 INFO | 192.168.0.219 | 200 | 423.8µs | GET | 未登录 | /docs/doc.json
|
||||
2024-07-24 17:36:22 INFO | 192.168.0.219 | 200 | 0s | GET | 未登录 | /docs/favicon-32x32.png
|
||||
|
@ -33,17 +33,35 @@ type Report struct {
|
||||
}
|
||||
|
||||
type FinalReport struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
Product string `json:"product"`
|
||||
Lot string `json:"lot"`
|
||||
PBI string `json:"pbi"`
|
||||
Step string `json:"step"`
|
||||
ReportTestQuantity string `json:"report_test_quantity"` // 报表测试数量
|
||||
ReportPassQuantity string `json:"report_pass_quantity"` // 报表良品数量
|
||||
ReportPassProbability string `json:"report_pass_probability"` // 报表良率
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
Step string `json:"step"`
|
||||
Product string `json:"product"` // 成品型号
|
||||
Lot string `json:"lot"` // 晶圆批次
|
||||
Factory string `json:"factory"` // 测试厂
|
||||
TestProgram string `json:"test_program"` // 测试程序
|
||||
PBI string `json:"pbi"` // PBI
|
||||
OrderDate string `json:"order_date"` // 下单日期
|
||||
Seal string `json:"seal"` // 丝印
|
||||
FinalTestQuantity string `json:"final_test_quantity"` // 结批测试数量
|
||||
FinalPassQuantity string `json:"final_pass_quantity"` // 结批良品数量
|
||||
FinalPassProbability string `json:"final_pass_probability"` // 结批良率
|
||||
Bin1 string `json:"bin1"`
|
||||
Bin2 string `json:"bin2"`
|
||||
Bin3 string `json:"bin3"`
|
||||
Bin4 string `json:"bin4"`
|
||||
Bin5 string `json:"bin5"`
|
||||
Bin6 string `json:"bin6"`
|
||||
Bin7 string `json:"bin7"`
|
||||
Bin8 string `json:"bin8"`
|
||||
Bin9 string `json:"bin9"`
|
||||
Bin10 string `json:"bin10"`
|
||||
OutlookFail string `json:"outlook_fail"` // 外观不良
|
||||
Other string `json:"other"` // 少数
|
||||
BentStitch string `json:"bent_stitch"` // 弯脚
|
||||
Scrapped string `json:"scrapped"` // 报废
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
}
|
||||
|
||||
type ReportSites struct {
|
||||
@ -126,3 +144,34 @@ type ReportBinFail struct {
|
||||
Proportion string `json:"proportion"`
|
||||
ReportProportion string `json:"report_proportion"`
|
||||
}
|
||||
|
||||
type FinalReportExcel struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
Product string `json:"product"` // 成品型号
|
||||
Lot string `json:"lot"` // 晶圆批次
|
||||
Factory string `json:"factory"` // 测试厂
|
||||
TestProgram string `json:"test_program"` // 测试程序
|
||||
PBI string `json:"pbi"` // PBI
|
||||
OrderDate string `json:"order_date"` // 下单日期
|
||||
Seal string `json:"seal"` // 丝印
|
||||
FinalTestQuantity string `json:"final_test_quantity"` // 结批测试数量
|
||||
FinalPassQuantity string `json:"final_pass_quantity"` // 结批良品数量
|
||||
FinalPassProbability string `json:"final_pass_probability"` // 结批良率
|
||||
Bin1 string `json:"bin1"`
|
||||
Bin2 string `json:"bin2"`
|
||||
Bin3 string `json:"bin3"`
|
||||
Bin4 string `json:"bin4"`
|
||||
Bin5 string `json:"bin5"`
|
||||
Bin6 string `json:"bin6"`
|
||||
Bin7 string `json:"bin7"`
|
||||
Bin8 string `json:"bin8"`
|
||||
Bin9 string `json:"bin9"`
|
||||
Bin10 string `json:"bin10"`
|
||||
OutlookFail string `json:"outlook_fail"` // 外观不良
|
||||
Other string `json:"other"` // 少数
|
||||
BentStitch string `json:"bent_stitch"` // 弯脚
|
||||
Scrapped string `json:"scrapped"` // 报废
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
}
|
||||
|
101
model/warning.go
Normal file
101
model/warning.go
Normal file
@ -0,0 +1,101 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Warning struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
ProductionControl []ProductionControl `json:"production_control" gorm:"foreignKey:WarningID;references:ID"`
|
||||
PassProbabilityDiff []PassProbabilityDiff `json:"pass_probability_diff" gorm:"foreignKey:WarningID;references:ID"`
|
||||
BinControl []BinControl `json:"bin_control" gorm:"foreignKey:WarningID;references:ID"`
|
||||
SelectionDiffControl []SelectionDiffControl `json:"selection_diff_control" gorm:"foreignKey:WarningID;references:ID"`
|
||||
StackingMaterialsWarning []StackingMaterialsWarning `json:"stacking_materials_warning" gorm:"foreignKey:WarningID;references:ID"`
|
||||
HistogramSelection []HistogramSelection `json:"histogram_selection" gorm:"foreignKey:WarningID;references:ID"`
|
||||
ScatterSelection []ScatterSelection `json:"scatter_selection" gorm:"foreignKey:WarningID;references:ID"`
|
||||
Product string `json:"product"` // 成品型号
|
||||
Step string `json:"step"` // 工序
|
||||
FirstPassProbabilityLimitL string `json:"first_pass_probability_limit_l"` // 一次通过率下限
|
||||
ReturnProbabilityLimitH string `json:"return_probability_limit_h"` // 回收率上限
|
||||
PassProbabilityLimitL string `json:"pass_probability_limit_l"` // 良率下限
|
||||
AveragePassProbability string `json:"average_pass_probability"` // 平均良率
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
||||
}
|
||||
|
||||
type ProductionControl struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
WarningID int64 `json:"warning_id"`
|
||||
Factory string `json:"factory"`
|
||||
TestQuantityDiffH string `json:"test_quantity_diff_h"` // 测试数量差异上限
|
||||
TestQuantityDiffL string `json:"test_quantity_diff_l"` // 测试数量差异下限
|
||||
PassQuantityDiffH string `json:"pass_quantity_diff_h"` // 良品数量差异上限
|
||||
PassQuantityDiffL string `json:"pass_quantity_diff_l"` // 良品数量差异下限
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
||||
}
|
||||
|
||||
type PassProbabilityDiff struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
WarningID int64 `json:"warning_id"`
|
||||
SitePassProbabilityDiff string `json:"site_pass_probability_diff"` // 各SITE良率差异设置(一次通过率)
|
||||
PassProbabilityDiff string `json:"pass_probability_diff"` // 良率差异设置(报表良率)
|
||||
PassProbabilityWave string `json:"pass_probability_wave"` // 良率波动设置(报表良率)
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
||||
}
|
||||
|
||||
type BinControl struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
WarningID int64 `json:"warning_id"`
|
||||
Bin string `json:"bin"`
|
||||
BinFailLimitH string `json:"bin_fail_limit_h"` // 关键Bin失效上限
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
||||
}
|
||||
|
||||
type SelectionDiffControl struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
WarningID int64 `json:"warning_id"`
|
||||
SiteDiff string `json:"site_diff"` // SITE间差异(均值最大值-均值最小值)
|
||||
SubBatchDiff string `json:"sub_batch_diff"` // 批次间差异(均值最大值-均值最小值)
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
||||
}
|
||||
|
||||
type StackingMaterialsWarning struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
WarningID int64 `json:"warning_id"`
|
||||
Selection string `json:"selection"` // 参数
|
||||
Diff string `json:"diff"` // 差异
|
||||
Unit string `json:"unit"` // 单位
|
||||
Quantity string `json:"quantity"` // 数量
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
||||
}
|
||||
|
||||
type HistogramSelection struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
WarningID int64 `json:"warning_id"`
|
||||
Selection string `json:"selection"` // 参数
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
||||
}
|
||||
|
||||
type ScatterSelection struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
WarningID int64 `json:"warning_id"`
|
||||
XSelection string `json:"x_selection"` // 参数-X
|
||||
YSelection string `json:"y_selection"` // 参数-Y
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"-"`
|
||||
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
||||
}
|
92
repository/test.data/report.excel.go
Normal file
92
repository/test.data/report.excel.go
Normal file
@ -0,0 +1,92 @@
|
||||
package test_data
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"gorm.io/gorm"
|
||||
"testData/global"
|
||||
"testData/model"
|
||||
"testData/request"
|
||||
)
|
||||
|
||||
func CreateFinalReportExcel(req *request.CreateFinalReportExcel) error {
|
||||
var finalReportExcel *model.FinalReportExcel
|
||||
if errors.Is(global.PostGreSQL.Where("factory = ?", req.Factory).Find(&finalReportExcel).Error, gorm.ErrRecordNotFound) {
|
||||
global.PostGreSQL.Create(&model.FinalReportExcel{
|
||||
Product: req.Product,
|
||||
Lot: req.Lot,
|
||||
Factory: req.Factory,
|
||||
TestProgram: req.TestProgram,
|
||||
PBI: req.PBI,
|
||||
OrderDate: req.OrderDate,
|
||||
Seal: req.Seal,
|
||||
FinalTestQuantity: req.FinalTestQuantity,
|
||||
FinalPassQuantity: req.FinalPassQuantity,
|
||||
FinalPassProbability: req.FinalPassProbability,
|
||||
Bin1: req.Bin1,
|
||||
Bin2: req.Bin2,
|
||||
Bin3: req.Bin3,
|
||||
Bin4: req.Bin4,
|
||||
Bin5: req.Bin5,
|
||||
Bin6: req.Bin6,
|
||||
Bin7: req.Bin7,
|
||||
Bin8: req.Bin8,
|
||||
Bin9: req.Bin9,
|
||||
Bin10: req.Bin10,
|
||||
OutlookFail: req.OutlookFail,
|
||||
Other: req.Other,
|
||||
BentStitch: req.BentStitch,
|
||||
Scrapped: req.Scrapped,
|
||||
})
|
||||
}
|
||||
return errors.New(req.Factory + "信息已存在")
|
||||
}
|
||||
|
||||
func ShowListFinalReportExcel(offset, limit int, keyword string) ([]*model.FinalReportExcel, int64, error) {
|
||||
var finalReportExcel []*model.FinalReportExcel
|
||||
var total int64
|
||||
global.PostGreSQL.Find(&finalReportExcel).Count(&total).Offset(offset).Limit(limit).Find(&finalReportExcel)
|
||||
return finalReportExcel, total, nil
|
||||
}
|
||||
|
||||
func UpdateFinalReportExcel(req *request.UpdateFinalReportExcel) error {
|
||||
var finalReportExcel *model.FinalReportExcel
|
||||
if errors.Is(global.PostGreSQL.Find(&finalReportExcel, req.ID).Error, gorm.ErrRecordNotFound) {
|
||||
return errors.New("未找到需要修改的厂商")
|
||||
}
|
||||
global.PostGreSQL.Model(&finalReportExcel).Updates(map[string]interface{}{
|
||||
"product": req.Product,
|
||||
"lot": req.Lot,
|
||||
"factory": req.Factory,
|
||||
"test_program": req.TestProgram,
|
||||
"pbi": req.PBI,
|
||||
"order_date": req.OrderDate,
|
||||
"seal": req.Seal,
|
||||
"final_test_quantity": req.FinalTestQuantity,
|
||||
"final_pass_quantity": req.FinalPassQuantity,
|
||||
"final_pass_probability": req.FinalPassProbability,
|
||||
"bin1": req.Bin1,
|
||||
"bin2": req.Bin2,
|
||||
"bin3": req.Bin3,
|
||||
"bin4": req.Bin4,
|
||||
"bin5": req.Bin5,
|
||||
"bin6": req.Bin6,
|
||||
"bin7": req.Bin7,
|
||||
"bin8": req.Bin8,
|
||||
"bin9": req.Bin9,
|
||||
"bin10": req.Bin10,
|
||||
"outlook_fail": req.OutlookFail,
|
||||
"other": req.Other,
|
||||
"bent_stitch": req.BentStitch,
|
||||
"scrapped": req.Scrapped,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeleteFinalReportExcel(req *request.DeleteFinalReportExcel) error {
|
||||
var finalReportExcel *model.FinalReportExcel
|
||||
if errors.Is(global.PostGreSQL.Find(&finalReportExcel, req.ID).Error, gorm.ErrRecordNotFound) {
|
||||
return errors.New("未找到需要删除的厂商")
|
||||
}
|
||||
global.PostGreSQL.Delete(&finalReportExcel)
|
||||
return nil
|
||||
}
|
@ -377,9 +377,9 @@ func CPList(r *request.CPList) ([]*model.ReportList, int64) {
|
||||
FirstPassProbability: report.FirstPassProbability,
|
||||
PassQuantity: report.PassQuantity,
|
||||
PassProbability: report.PassProbability,
|
||||
ReportTestQuantity: finalReport.ReportTestQuantity,
|
||||
ReportPassQuantity: finalReport.ReportPassQuantity,
|
||||
ReportPassProbability: finalReport.ReportPassProbability,
|
||||
ReportTestQuantity: finalReport.FinalTestQuantity,
|
||||
ReportPassQuantity: finalReport.FinalPassQuantity,
|
||||
ReportPassProbability: finalReport.FinalPassProbability,
|
||||
TestTime: report.TestTime,
|
||||
Step: "CP",
|
||||
StackingMaterials: report.StackingMaterials,
|
||||
@ -807,9 +807,9 @@ func FTList(r *request.FTList) ([]*model.ReportList, int64) {
|
||||
FirstPassProbability: report.FirstPassProbability,
|
||||
PassQuantity: report.PassQuantity,
|
||||
PassProbability: report.PassProbability,
|
||||
ReportTestQuantity: finalReport.ReportTestQuantity,
|
||||
ReportPassQuantity: finalReport.ReportPassQuantity,
|
||||
ReportPassProbability: finalReport.ReportPassProbability,
|
||||
ReportTestQuantity: finalReport.FinalTestQuantity,
|
||||
ReportPassQuantity: finalReport.FinalPassQuantity,
|
||||
ReportPassProbability: finalReport.FinalPassProbability,
|
||||
TestTime: report.TestTime,
|
||||
Step: "FT",
|
||||
StackingMaterials: report.StackingMaterials,
|
||||
|
90
repository/test.data/warning.go
Normal file
90
repository/test.data/warning.go
Normal file
@ -0,0 +1,90 @@
|
||||
package test_data
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"gorm.io/gorm"
|
||||
"testData/global"
|
||||
"testData/model"
|
||||
)
|
||||
|
||||
func UpdateWarning(req *model.Warning) error {
|
||||
var warning *model.Warning
|
||||
if errors.Is(global.PostGreSQL.Where("product = ? AND step = ?", req.Product, req.Step).Find(&warning).Error, gorm.ErrRecordNotFound) {
|
||||
global.PostGreSQL.Create(&model.Warning{
|
||||
Product: req.Product,
|
||||
Step: req.Step,
|
||||
FirstPassProbabilityLimitL: req.FirstPassProbabilityLimitL,
|
||||
ReturnProbabilityLimitH: req.ReturnProbabilityLimitH,
|
||||
PassProbabilityLimitL: req.PassProbabilityLimitL,
|
||||
AveragePassProbability: req.AveragePassProbability,
|
||||
}).Find(&warning)
|
||||
} else {
|
||||
global.PostGreSQL.Model(&warning).Updates(map[string]interface{}{
|
||||
"first_pass_probability_limit_l": req.FirstPassProbabilityLimitL,
|
||||
"return_probability_limit_h": req.ReturnProbabilityLimitH,
|
||||
"pass_probability_limit_l": req.PassProbabilityLimitL,
|
||||
"average_pass_probability": req.AveragePassProbability,
|
||||
})
|
||||
}
|
||||
for _, v := range req.ProductionControl {
|
||||
v.WarningID = warning.ID
|
||||
}
|
||||
global.PostGreSQL.Where("warning_id = ?", warning.ID).Delete(&model.ProductionControl{})
|
||||
global.PostGreSQL.Create(&req.ProductionControl)
|
||||
for _, v := range req.PassProbabilityDiff {
|
||||
v.WarningID = warning.ID
|
||||
}
|
||||
global.PostGreSQL.Where("warning_id = ?", warning.ID).Delete(&model.PassProbabilityDiff{})
|
||||
global.PostGreSQL.Create(&req.PassProbabilityDiff)
|
||||
for _, v := range req.BinControl {
|
||||
v.WarningID = warning.ID
|
||||
}
|
||||
global.PostGreSQL.Where("warning_id = ?", warning.ID).Delete(&model.BinControl{})
|
||||
global.PostGreSQL.Create(&req.BinControl)
|
||||
for _, v := range req.SelectionDiffControl {
|
||||
v.WarningID = warning.ID
|
||||
}
|
||||
global.PostGreSQL.Where("warning_id = ?", warning.ID).Delete(&model.SelectionDiffControl{})
|
||||
global.PostGreSQL.Create(&req.SelectionDiffControl)
|
||||
for _, v := range req.StackingMaterialsWarning {
|
||||
v.WarningID = warning.ID
|
||||
}
|
||||
global.PostGreSQL.Where("warning_id = ?", warning.ID).Delete(&model.StackingMaterialsWarning{})
|
||||
global.PostGreSQL.Create(&req.StackingMaterialsWarning)
|
||||
for _, v := range req.HistogramSelection {
|
||||
v.WarningID = warning.ID
|
||||
}
|
||||
global.PostGreSQL.Where("warning_id = ?", warning.ID).Delete(&model.HistogramSelection{})
|
||||
global.PostGreSQL.Create(&req.HistogramSelection)
|
||||
for _, v := range req.ScatterSelection {
|
||||
v.WarningID = warning.ID
|
||||
}
|
||||
global.PostGreSQL.Where("warning_id = ?", warning.ID).Delete(&model.ScatterSelection{})
|
||||
global.PostGreSQL.Create(&req.ScatterSelection)
|
||||
return nil
|
||||
}
|
||||
|
||||
func ShowListWarning(offset, limit int, keyWord string) ([]*model.Warning, int64, error) {
|
||||
var warnings []*model.Warning
|
||||
var total int64
|
||||
if keyWord == "" {
|
||||
global.PostGreSQL.Find(&warnings).
|
||||
Count(&total).Offset(offset).Limit(limit).
|
||||
Preload("ProductionControl").Preload("PassProbabilityDiff").Preload("BinControl").
|
||||
Preload("SelectionDiffControl").Preload("StackingMaterialsWarning").Preload("HistogramSelection").
|
||||
Preload("ScatterSelection").Find(&warnings)
|
||||
} else {
|
||||
global.PostGreSQL.Where("product LIKE ?", keyWord).Find(&warnings).
|
||||
Count(&total).Offset(offset).Limit(limit).Find(&warnings)
|
||||
}
|
||||
return warnings, total, nil
|
||||
}
|
||||
|
||||
func DeleteWarning(req *model.Warning) error {
|
||||
var warning *model.Warning
|
||||
if errors.Is(global.PostGreSQL.Find(&warning, req.ID).Error, gorm.ErrRecordNotFound) {
|
||||
return errors.New("未找到需要删除的型号信息")
|
||||
}
|
||||
global.PostGreSQL.Delete(&warning)
|
||||
return nil
|
||||
}
|
37
request/report.excel.go
Normal file
37
request/report.excel.go
Normal file
@ -0,0 +1,37 @@
|
||||
package request
|
||||
|
||||
type CreateFinalReportExcel struct {
|
||||
Product string `json:"product"` // 成品型号
|
||||
Lot string `json:"lot"` // 晶圆批次
|
||||
Factory string `json:"factory"` // 测试厂
|
||||
TestProgram string `json:"test_program"` // 测试程序
|
||||
PBI string `json:"pbi"` // PBI
|
||||
OrderDate string `json:"order_date"` // 下单日期
|
||||
Seal string `json:"seal"` // 丝印
|
||||
FinalTestQuantity string `json:"final_test_quantity"` // 结批测试数量
|
||||
FinalPassQuantity string `json:"final_pass_quantity"` // 结批良品数量
|
||||
FinalPassProbability string `json:"final_pass_probability"` // 结批良率
|
||||
Bin1 string `json:"bin1"`
|
||||
Bin2 string `json:"bin2"`
|
||||
Bin3 string `json:"bin3"`
|
||||
Bin4 string `json:"bin4"`
|
||||
Bin5 string `json:"bin5"`
|
||||
Bin6 string `json:"bin6"`
|
||||
Bin7 string `json:"bin7"`
|
||||
Bin8 string `json:"bin8"`
|
||||
Bin9 string `json:"bin9"`
|
||||
Bin10 string `json:"bin10"`
|
||||
OutlookFail string `json:"outlook_fail"` // 外观不良
|
||||
Other string `json:"other"` // 少数
|
||||
BentStitch string `json:"bent_stitch"` // 弯脚
|
||||
Scrapped string `json:"scrapped"` // 报废
|
||||
}
|
||||
|
||||
type UpdateFinalReportExcel struct {
|
||||
DeleteFinalReportExcel
|
||||
CreateFinalReportExcel
|
||||
}
|
||||
|
||||
type DeleteFinalReportExcel struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
17
router/report.excel.go
Normal file
17
router/report.excel.go
Normal file
@ -0,0 +1,17 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
test_data "testData/api/test.data"
|
||||
)
|
||||
|
||||
func InitFinalReportExcelRouter(R *gin.RouterGroup) {
|
||||
finalReportExcelService := test_data.InitFinalReportExcelService()
|
||||
finalReportGroup := R.Group("finalReport")
|
||||
{
|
||||
finalReportGroup.POST("excel", finalReportExcelService.Create)
|
||||
finalReportGroup.PUT("excel", finalReportExcelService.Update)
|
||||
finalReportGroup.GET("excel", finalReportExcelService.ShowList)
|
||||
finalReportGroup.DELETE("excel", finalReportExcelService.Delete)
|
||||
}
|
||||
}
|
16
router/warning.go
Normal file
16
router/warning.go
Normal file
@ -0,0 +1,16 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
test_data "testData/api/test.data"
|
||||
)
|
||||
|
||||
func InitWarningRouter(R *gin.RouterGroup) {
|
||||
warningService := test_data.InitWarningService()
|
||||
warningGroup := R.Group("warning")
|
||||
{
|
||||
warningGroup.POST("", warningService.Update)
|
||||
warningGroup.GET("", warningService.ShowList)
|
||||
warningGroup.DELETE("", warningService.Delete)
|
||||
}
|
||||
}
|
19
utils/pagination.go
Normal file
19
utils/pagination.go
Normal file
@ -0,0 +1,19 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// PaginationLimitAndPage 获取分页page与pageSize, 返回gorm需要的limit,offset与一个error
|
||||
func PaginationLimitAndPage(c *gin.Context) (int, int, error) {
|
||||
limit, err := strconv.Atoi(c.Query("pageSize"))
|
||||
page, err := strconv.Atoi(c.Query("page"))
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
if page > 0 {
|
||||
page--
|
||||
}
|
||||
return page * limit, limit, nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user